Bug 121256 - local variable used before set
Summary: local variable used before set
Alias: None
Product: Fedora
Classification: Fedora
Component: gaim   
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Christopher Blizzard
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-04-19 19:57 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
4 users (show)

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

Attachments (Terms of Use)

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:
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.


Comment 3 Ethan Blanton 2004-04-19 20:27:15 UTC

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


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.

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