Bug 114994 - Missing return expression & printf problem
Summary: Missing return expression & printf problem
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libwpd
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Caolan McNamara
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-05 09:59 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-04-29 22:07:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2004-02-05 09:59:01 UTC
Description of problem:

I just tried to compile package libwpd-0.6.2-1 from Redhat
Fedora Core 1.

The compiler said

1.

RawListener.cpp:109: warning: too few arguments for format

The source code is

        printf("<DATE SET year: %i month: %i day: %i hour: %i minute:
%i second: %i dayOfWeek: %i timeZone: %i unused: %i>\n");

Quite a few missing parameters here.

2.

libwpd_support.cpp(623): warning #1011: missing return statement at
end of non-void function "UTF8String::operator="

The source code is

UTF8String & UTF8String::operator=(const UTF8String &str)
{
        // FIXME FIXME FIXME (IMPORTANT): Protect against the case of
        // self assignment (x=x)
        m_buf = g_string_assign(m_buf, str.getUTF8());
}

Have they not considered the missing return statement ?



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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Marc Maurer 2004-02-07 15:16:26 UTC
This is fixed in the latest libwpd releases.

Comment 2 Caolan McNamara 2004-04-29 22:07:47 UTC
Yep. Fedora Core 2 is now using libwpd 0.7.1 and those two sections of
problematic code are now commented so the problem is resolved.


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