xtradb compiler warnings

Bug #609803 reported by Mark Callaghan on 2010-07-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
New
Undecided
Kristian Nielsen

Bug 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

Kristian Nielsen (knielsen) wrote :

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).

Changed in maria:
status: New → Won't Fix
assignee: nobody → Kristian Nielsen (knielsen)
Mark Callaghan (mdcallag) wrote :

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

Sergei Golubchik (sergii) wrote :

ok, we'll look at them

Changed in maria:
status: Won't Fix → New
Changed in maria:
milestone: none → 5.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers