Bug 290688 - Akregator fails to build with gcc 4.7
Summary: Akregator fails to build with gcc 4.7
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-05 13:11 UTC by Radek Novacek
Modified: 2012-01-07 18:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Radek Novacek 2012-01-05 13:11:46 UTC
Version:           unspecified (using Devel) 
OS:                Linux

g++ 4.7 introduces some changes that fails akregator to build.

You can see build log here:
http://koji.fedoraproject.org/koji/getfile?taskID=3620194&name=build.log

And proposed patch that fixes this issue:
http://pkgs.fedoraproject.org/gitweb/?p=kdenetwork.git;a=blob_plain;f=kdenetwork-4.7.97-fix-for-g%2B%2B47.patch;hb=acb57c7c7305115b78aeadcefa3434459b0b79e7

Reproducible: Always

Steps to Reproduce:
Just issue compilation with gcc(g++) 4.7


Expected Results:  
Build succeeds.

This happens with kdenetwork-4.7.97.
Comment 1 Radek Novacek 2012-01-05 13:22:34 UTC
Sorry, proposed patch in initial report was wrong, hopefully this is correct:

http://pkgs.fedoraproject.org/gitweb/?p=kdenetwork.git;a=blob_plain;f=kdenetwork-4.7.97-fix-for-g%2B%2B47.patch;hb=HEAD
Comment 3 Christoph Feck 2012-01-05 15:59:39 UTC
I rather suggest to use an "unsigned int" for n, so that the compiler knows it cannot be negative (passing 0 to memset is OK).
Comment 4 Allen Winter 2012-01-07 18:55:53 UTC
Git commit cd7e237dde2d0a81a49d6f5e73636870ff3f7fb1 by Allen Winter.
Committed on 07/01/2012 at 19:54.
Pushed by winterz into branch 'master'.

in c4_String::c4_String(), only call memset() if the number of bytes
to set is greater than 0.
MERGE: 4.8

M  +14   -12   akregator/plugins/mk4storage/metakit/src/string.cpp

http://commits.kde.org/kdepim/cd7e237dde2d0a81a49d6f5e73636870ff3f7fb1
Comment 5 Allen Winter 2012-01-07 18:56:23 UTC
Git commit 645cefecafc3b40f4cb91675703335bfdc8f8b91 by Allen Winter.
Committed on 07/01/2012 at 19:54.
Pushed by winterz into branch 'KDE/4.8'.

in c4_String::c4_String(), only call memset() if the number of bytes
to set is greater than 0.
MERGE: 4.8
(cherry picked from commit cd7e237dde2d0a81a49d6f5e73636870ff3f7fb1)

M  +14   -12   akregator/plugins/mk4storage/metakit/src/string.cpp

http://commits.kde.org/kdepim/645cefecafc3b40f4cb91675703335bfdc8f8b91