Bug 121256

Summary: local variable used before set
Product: [Fedora] Fedora Reporter: d.binderman
Component: gaimAssignee: Christopher Blizzard <blizzard>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: eblanton, lschiere+bugs, mark, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-04-19 22:22:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description d.binderman 2004-04-19 19:57:02 UTC
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:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Luke Schierer 2004-04-19 20:05:19 UTC
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 20:14:14 UTC
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.

Ethan

Comment 3 Ethan Blanton 2004-04-19 20:27:15 UTC
http://cvs.sourceforge.net/viewcvs.py/gaim/gaim/src/protocols/zephyr/zephyr.c?r1=1.87&r2=1.88&diff_format=u

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

Ethan

Comment 4 Warren Togami 2004-04-19 22:22:46 UTC
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.