Bug 114994

Summary: Missing return expression & printf problem
Product: [Fedora] Fedora Reporter: d.binderman
Component: libwpdAssignee: Caolan McNamara <caolanm>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-04-29 22:07:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.