Bug 159165 - local variable used before set
Summary: local variable used before set
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-pilot-conduits
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC5Target
TreeView+ depends on / blocked
 
Reported: 2005-05-30 21:55 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-20 23:09:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2005-05-30 21:55:36 UTC
Description of problem:

I just tried to compile package gnome-pilot-conduits-2.0.13-1 from Redhat
Fedora Core development tree with the most excellent Intel C compiler.

The compiler said

email_conduit.c(456): remark #592: variable "size" is used before its value is set

The source code is

            dlp_WriteRecord( dbi->pilot_socket, dbHandle, attr, recID, 3,
                             pi_buf, size, 0);

Suggest initialise local variable "size" 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 Dave Malcolm 2005-08-18 03:46:12 UTC
Thanks for this report; I'll look into getting this fixed.

Comment 2 Dave Malcolm 2006-01-12 03:59:18 UTC
The "size" local used to be written back to at top of the loop in the syncronize
function by call to dlp_ReadNextRecInCategory; this was patched away, leaving a
genuine bug; another argument to this function was also wrong, leading to a
crash on synchronization if the send action was "file".

Rebuilding into dist-fc5-HEAD as gnome-pilot-conduits-2.0.13-3.FC5

Comment 3 Christopher Aillon 2006-01-20 23:09:00 UTC
This seems fixed in rawhide.


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