Bug 158756

Summary: fbi-2.03-10: local variable used before set
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Gerd Hoffmann <kraxel>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.1   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2006-03-16 18:41:55 UTC
I just tried to compile package fbi-2.03-10 with the Intel C compiler.

It said

sane.c(40): warning #592: variable "list" is used before its value is set

The source code is

    wlist = malloc(sizeof(Widget*)*nchildren);
    memcpy(list,children,sizeof(Widget*)*nchildren);

I agree with the compiler.  Suggest new code

    wlist = malloc( wsizeof(Widget*) * nchildren);
    memcpy( wlist, wchildren, wsizeof(Widget*)*nchildren);
Comment 1 Gerd Hoffmann 2006-03-17 12:50:13 UTC
Fixed in fbida cvs.