Bug 121256 - local variable used before set
local variable used before set
Product: Fedora
Classification: Fedora
Component: gaim (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Christopher Blizzard
Depends On:
  Show dependency treegraph
Reported: 2004-04-19 15:57 EDT by d.binderman
Modified: 2007-11-30 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-04-19 18:22:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description d.binderman 2004-04-19 15:57:02 EDT
Description of problem:

I just tried to compile Core2 Test2 package gaim-0.75.99-20040318cvs.2

The compiler said

zephyr.c(1043): remark #592: variable "notice" is used before its
value is set

The source code is

        if(!(inst = (char *)gaim_conv_chat_get_topic(gcc)))
                inst = (char *)notice.z_class_inst;

This is the first mention of notice since it's declaration. 

        ZNotice_t notice;

Suggest init notice before first use.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Luke Schierer 2004-04-19 16:05:19 EDT
based on the variable names, this looks like zepher code. were you
just trying to edit gaim's source, or did an actual bug cause you to
notice this? it looks like a fairly typical instance of testing to see
if the assignment works.  its highly confusing that we do this, since
most of the times you see something like that its ment to be an ==
instead of an =, but it does work and is valid. 
Comment 2 Ethan Blanton 2004-04-19 16:14:14 EDT
It is Zephyr, but actually I believe the problem is on the second line
... which is not and should not be an ==.  It is kind of a pedantic
bug report, but it should probably be fixed in case anyone actually
uses the zephyr plugin as shipped.  Which no one does.  :-P  I'm
looking into it.

Comment 3 Ethan Blanton 2004-04-19 16:27:15 EDT

Fixed in CVS.  That link won't be available to anoncvs for a few hours.

Comment 4 Warren Togami 2004-04-19 18:22:46 EDT
Glad to see this is fixed for 0.77.  This is not an issue for Fedora
Core, so will just wait until 0.77 is released and we will pull in
this fix along with everything else.

Note You need to log in before you can comment on or make changes to this bug.