Bug 114286 - used before set && missing return statement
Summary: used before set && missing return statement
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-vfs-extras
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-26 10:38 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-04-22 05:01:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2004-01-26 10:38:32 UTC
Description of problem:

I just tried to compile package gnome-vfs-extras-0.2.0-7, from Redhat
Fedora Core 1.

The compiler said

1.

smb-method.c(196): warning #1011: missing return statement at end of
non-void function "smb_virtual_file_new"
set

The source code is

static SmbVirtualFile *
smb_virtual_file_new (SmbVirtualFileType type)
{
        SmbVirtualFile *file;

        file = g_new0 (SmbVirtualFile, 1);
        file->virtual_type = type;
}

Seems to be missing a return statment.

2.

smb-method.c(1674): remark #592: variable "content" is used before its
value is

Source code is

	SmbDirContent *content;

	/* more code */

    if (content->mode & aDIR)

Clearly broken code. I'm not sure what the fix is for this.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 David Binderman 2004-11-18 09:50:59 UTC
I can confirm that these bugs still exist in Fedora Core 3.

Nothing seems to have happened in the last ten months.

Comment 2 John Thacker 2006-04-22 05:01:37 UTC
Not going to patch upstream code to quiet a compiler warning rather 
than fix a bug or error.


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