[MDEV-753] LP:609803 - xtradb compiler warnings Created: 2010-07-25  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Mark Callaghan Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug609803.xml    

 Description   

xtradb in MariaDB has compiler warnings. Official InnoDB has none.

From mariadb-5.1.42:

btr/btr0cur.c:3305: warning: value computed is not used
btr/btr0cur.c:3236: warning: ‘n_not_nulls’ may be used uninitialized in this function
fil/fil0fil.c:3101: warning: pointer targets in passing argument 2 of ‘dict_table_get_index_on_name’ differ in signedness
handler/i_s.cc:2991: warning: unused variable ‘cs’
log/log0recv.c:3283: warning: unused variable ‘file’
os/os0file.c:4194: warning: pointer targets in assignment differ in signedness
srv/srv0srv.c:1123: warning: value computed is not used
srv/srv0srv.c:1153: warning: value computed is not used
srv/srv0srv.c:1360: warning: value computed is not used
sync/sync0sync.c:426: warning: unused variable ‘ptr’

From latest bzr code for lp:maria/5.2

warnings for storage/xtradb

btr/btr0btr.c:2871: warning: null argument where non-null required (argument 1)
btr/btr0cur.c:1841: warning: null argument where non-null required (argument 2)
btr/btr0cur.c:1860: warning: null argument where non-null required (argument 1)
btr/btr0cur.c:1967: warning: null argument where non-null required (argument 1)
fil/fil0fil.c:3106: warning: pointer targets in passing argument 2 of 'dict_table_get_index_on_name' differ in signedness
ibuf/ibuf0ibuf.c:775: warning: null argument where non-null required (argument 1)
ibuf/ibuf0ibuf.c:950: warning: null argument where non-null required (argument 1)
os/os0file.c:4194: warning: pointer targets in assignment differ in signedness
srv/srv0srv.c:1129: warning: value computed is not used
srv/srv0srv.c:1159: warning: value computed is not used
srv/srv0srv.c:1366: warning: value computed is not used

storage/innodb_plugin has no warnings for the same branch



 Comments   
Comment by Kristian Nielsen [ 2010-07-27 ]

Re: xtradb compiler warnings
In MariaDB, we maintain a file support-files/compiler_warnings.supp. This file
is similar to mysql-test/valgrind.supp, it is a list of compiler warnings to
ignore.

This is a compromise between on the one hand eliminating all warnings (so new
ones are easy to spot), and on the other hand not unnecessarily convoluting
the code in cases where a compiler produces a false warning that requires
unnatural code rewrite to eliminate.

The Buildbot setup parses this .supp file to eliminate warnings to be
suppressed. There is a script support-files/ccfilter which can be used to do
similar warning suppressions in a local build.

As far as I can see, the mentioned warnings are already suppressed, and
Buildbot seems to have no non-suppressed compiler warnings on non-windows
platforms.

Of course, it might be that some warnings are needlessly (or wrongly)
suppressed, and such should be fixed; however, I took this bug report to be
simply that we do not have zero warnings. For zero warnings in MariaDB,
currently the policy is that this requires using the compiler_warnings.supp
file.

(Note that the latest MariaDB 5.1 release is 5.1.47).

Comment by Mark Callaghan [ 2010-07-27 ]

Re: xtradb compiler warnings
I opened this bug because xtradb has warnings that are not in official InnoDB. I think these should be fixed, not suppressed.

Comment by Sergei Golubchik [ 2010-07-27 ]

Re: xtradb compiler warnings
ok, we'll look at them

Comment by Rasmus Johansson (Inactive) [ 2010-11-30 ]

Launchpad bug id: 609803

Comment by Kristian Nielsen [ 2012-10-04 ]

fixed long ago, I believe

Generated at Thu Feb 08 06:31:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.