Bug 2981 - claws-mail-3.9.3 compilation warnings
Summary: claws-mail-3.9.3 compilation warnings
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Plugins/vCalendar (show other bugs)
Version: 3.9.3
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2013-07-19 11:38 UTC by mirraz1
Modified: 2015-07-19 10:28 UTC (History)
0 users

See Also:


Attachments
Compilation Warning elimination patch (2.20 KB, patch)
2014-02-06 08:46 UTC, mirraz1
no flags Details | Diff
implicit declaration elimination patch (653 bytes, patch)
2014-06-30 11:08 UTC, mirraz1
no flags Details | Diff

Description mirraz1 2013-07-19 11:38:49 UTC
Compiling claws-mail-3.9.2 for my Gentoo I got this message:

claws-mail-3.9.2/src/plugins/vcalendar/libical/libical/icalderivedproperty.c:374:4: warning: implicit declaration of function ‘icalproperty_add_parameters’ [-Wimplicit-function-declaration]
claws-mail-3.9.2/src/plugins/vcalendar/vcal_folder.c:2046:2: warning: implicit declaration of function ‘folder_item_prefs_save_config_recursive’ [-Wimplicit-function-declaration]
claws-mail-3.9.2/src/plugins/vcalendar/libical/libical/sspm.c:406:29: warning: array subscript is above array bounds [-Warray-bounds]
Comment 1 mirraz1 2013-09-29 09:10:39 UTC
In addition to warnings in previous comment I'v got this warning:
claws-mail-3.9.2/src/toolbar.c:1504:2: warning: implicit declaration of function ‘send_cancel’ [-Wimplicit-function-declaration]
Comment 2 mirraz1 2014-02-05 12:26:33 UTC
Building claws-mail-3.9.3 by gcc-4.8.2 I'v got this warnings:

src/plugins/vcalendar/libical/libical/icalderivedproperty.c:374:4: warning: implicit declaration of function ‘icalproperty_add_parameters’ [-Wimplicit-function-declaration]
src/plugins/vcalendar/vcal_folder.c:2044:2: warning: implicit declaration of function ‘folder_item_prefs_save_config_recursive’ [-Wimplicit-function-declaration]
src/plugins/vcalendar/libical/libical/icalmime.c:178:26: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
src/plugins/vcalendar/libical/libical/icalmime.c:364:26: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
src/plugins/vcalendar/libical/libical/icalparameter.c:109:25: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
src/plugins/vcalendar/libical/libical/sspm.c:688:2895: warning: argument to ‘sizeof’ in ‘strncmp’ call is the same expression as the second source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
src/plugins/vcalendar/libical/libical/sspm.c:794:2892: warning: argument to ‘sizeof’ in ‘strncmp’ call is the same expression as the second source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
Comment 3 Ricardo Mones 2014-02-05 12:58:50 UTC
Patches welcome if you have some time to kill: http://gcc.gnu.org/gcc-4.8/porting_to.html
Comment 4 mirraz1 2014-02-06 08:46:44 UTC
Created attachment 1331 [details]
Compilation Warning elimination patch

Propose patch that eliminates almost all warnings except more complicated one: icalderivedproperty.c:374:4: warning: implicit declaration of function ‘icalproperty_add_parameters’
Comment 5 users 2014-05-30 16:12:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2014-05-30 16:12:03.601066133 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=b706085e2aa43251776f154fe196e69cd1f952b4
Merge: 11501c1 8864301
Author: Colin Leroy <colin@colino.net>
Date:   Fri May 30 16:12:03 2014 +0200

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=8864301817cf1a62dc7f08fedaeebc8da66d6acb
Author: Colin Leroy <colin@colino.net>
Date:   Fri May 30 16:10:03 2014 +0200

    Fix stupid uses of sizeof(), thanks to mirraz1@rambler.ru
    Fixes bug #2981, "claws-mail-3.9.3 compilation warnings"
Comment 6 claws_mail_user 2014-06-21 20:43:56 UTC
I'm getting the similar bug from last 3.10.1 version:

I: A function overflows or underflows an array access. This could be a real error,
but occasionaly this condition is also misdetected due to loop unrolling or strange pointer
handling. So this is warning only, please review.
W: claws-mail arraysubscript sspm.c:406
Comment 7 mirraz1 2014-06-30 11:08:15 UTC
Created attachment 1413 [details]
implicit declaration elimination patch

As claws-mail-3.10.1 build log still contains last implicit declaration warning:
src/plugins/vcalendar/libical/libical/icalderivedproperty.c:374:4: warning: implicit declaration of function ‘icalproperty_add_parameters’ [-Wimplicit-function-declaration]
I propose patch that fixes that warning.
Comment 8 users 2015-04-29 20:31:02 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2015-04-29 20:31:02.190287998 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=3e1110c0e632dbf7ff7cf19f63a2a0d4108efe97
Merge: 5fe765a 6d45e57
Author: Colin Leroy <colin@colino.net>
Date:   Wed Apr 29 20:31:01 2015 +0200

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=6d45e57eb7e414bb4d276f2f3c9fc06ecb79726c
Author: Ricardo Mones <ricardo@mones.org>
Date:   Wed Apr 29 20:28:29 2015 +0200

    Fix bug #2981 and other two implicit...
    
    ...declaration warnings I probably introduced in previous commits:
    
    • notification_prefs.c:1285:2: warning: implicit declaration of function
      'filesel_select_file_open' [-Wimplicit-function-declaration]
    • rssyl_prefs.c:110:2: warning: implicit declaration of function
      'filesel_select_file_open' [-Wimplicit-function-declaration]
    • icalderivedproperty.c:374:4: warning: implicit declaration of function
      'icalproperty_add_parameters' [-Wimplicit-function-declaration]
    
    ;-)

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