Compiler warnings in XtraDB
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I get the following compiler warnings in XtraDB code in lp:percona-server:
buf/buf0buddy.c: In function ‘buf_buddy_
buf/buf0buddy.
In file included from buf/buf0buf.c:36:
./include/
buf/buf0buf.c: In function ‘_increment_
buf/buf0buf.c:84: warning: comparison of unsigned expression < 0 is always false
buf/buf0buf.c:86: warning: comparison is always false due to limited range of data type
buf/buf0flu.c: In function ‘buf_flush_
buf/buf0flu.c:723: warning: comparison between signed and unsigned
buf/buf0flu.c: In function ‘buf_flush_
buf/buf0flu.c:850: warning: comparison between signed and unsigned
buf/buf0flu.c:884: warning: comparison between signed and unsigned
dict/dict0load.c: In function ‘dict_check_
dict/dict0load.
fil/fil0fil.c: In function ‘fil_node_
fil/fil0fil.c:693: warning: comparison between signed and unsigned
mv -f .deps/libinnoba
fsp/fsp0fsp.c: In function ‘xdes_find_bit’:
fsp/fsp0fsp.c:475: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘xdes_get_n_used’:
fsp/fsp0fsp.c:544: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘xdes_is_full’:
fsp/fsp0fsp.c:581: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘xdes_init’:
fsp/fsp0fsp.c:642: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fsp_alloc_
fsp/fsp0fsp.c:1640: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fseg_find_
fsp/fsp0fsp.c:2189: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fseg_find_
fsp/fsp0fsp.c:2216: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fseg_get_
fsp/fsp0fsp.c:2244: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fseg_create_
fsp/fsp0fsp.c:2348: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fseg_fill_
fsp/fsp0fsp.c:2500: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fseg_alloc_
fsp/fsp0fsp.c:2662: warning: comparison between signed and unsigned
fsp/fsp0fsp.c:2684: warning: comparison between signed and unsigned
fsp/fsp0fsp.c:2738: warning: comparison between signed and unsigned
fsp/fsp0fsp.c:2782: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fsp_reserve_
fsp/fsp0fsp.c:2954: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fsp_reserve_
fsp/fsp0fsp.c:3037: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fsp_get_
fsp/fsp0fsp.c:3200: warning: comparison between signed and unsigned
fil/fil0fil.c: In function ‘fil_load_
fil/fil0fil.c:3781: warning: comparison between signed and unsigned
fil/fil0fil.c:3801: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fseg_validate_
fsp/fsp0fsp.c:3839: warning: comparison between signed and unsigned
fsp/fsp0fsp.c:3865: warning: comparison between signed and unsigned
fsp/fsp0fsp.c: In function ‘fsp_validate’:
fsp/fsp0fsp.c:4047: warning: comparison between signed and unsigned
fsp/fsp0fsp.c:4098: warning: comparison between signed and unsigned
fsp/fsp0fsp.c:4124: warning: comparison between signed and unsigned
fil/fil0fil.c: At top level:
fil/fil0fil.c:4972: warning: unused parameter ‘zip_size’
fil/fil0fil.c:4975: warning: unused parameter ‘byte_offset’
fil/fil0fil.c:4978: warning: unused parameter ‘len’
mtr/mtr0mtr.c: In function ‘mtr_memo_
mtr/mtr0mtr.c:134: warning: implicit declaration of function ‘buf_flush_
os/os0file.c:3394: warning: unused parameter ‘trx’
handler/
row/row0mysql.c: In function ‘row_insert_
row/row0mysql.
sync/sync0rw.c:236: warning: unused parameter ‘cfile_name’
sync/sync0rw.c:237: warning: unused parameter ‘cline’
srv/srv0srv.c: In function ‘srv_master_
srv/srv0srv.c:3087: warning: comparison between signed and unsigned
sync/sync0sync.
sync/sync0sync.
srv/srv0start.c: In function ‘open_or_
srv/srv0start.
trx/trx0sys.c: In function ‘trx_sys_
trx/trx0sys.c:328: warning: comparison between signed and unsigned
trx/trx0sys.c:361: warning: comparison between signed and unsigned
trx/trx0sys.c:362: warning: comparison between signed and unsigned
trx/trx0sys.c:371: warning: comparison between signed and unsigned
trx/trx0sys.c:372: warning: comparison between signed and unsigned
trx/trx0sys.c:380: warning: comparison between signed and unsigned
trx/trx0sys.c:475: warning: comparison between signed and unsigned
trx/trx0sys.c:508: warning: comparison between signed and unsigned
trx/trx0sys.c:509: warning: comparison between signed and unsigned
trx/trx0sys.c:518: warning: comparison between signed and unsigned
trx/trx0sys.c:519: warning: comparison between signed and unsigned
trx/trx0sys.c:527: warning: comparison between signed and unsigned
trx/trx0sys.c: In function ‘trx_sys_
trx/trx0sys.c:650: warning: comparison between signed and unsigned
trx/trx0sys.c:663: warning: comparison between signed and unsigned
Related branches
- Alexey Kopytov (community): Approve
- Percona developers: Pending requested
-
Diff: 1414 lines (+411/-238)15 files modifiedinnodb_dict_size_limit.patch (+128/-81)
innodb_expand_import.patch (+2/-2)
innodb_extend_slow.patch (+4/-17)
innodb_files_extend.patch (+63/-9)
innodb_fix_misc.patch (+21/-1)
innodb_io_patches.patch (+14/-10)
innodb_lru_dump_restore.patch (+8/-25)
innodb_pass_corrupt_table.patch (+3/-3)
innodb_purge_thread.patch (+6/-6)
innodb_separate_doublewrite.patch (+12/-4)
innodb_show_lock_name.patch (+62/-22)
innodb_split_buf_pool_mutex.patch (+63/-43)
innodb_stats.patch (+1/-1)
profiling_slow.patch (+1/-1)
userstat.patch (+23/-13)
Changed in percona-server: | |
assignee: | nobody → Yasufumi Kinoshita (yasufumi-kinoshita) |
Changed in percona-server: | |
status: | Fix Committed → Fix Released |
What I don't understand are....
Which option of gcc outputs the warnings "comparison between signed and unsigned"?
I have not met the warnings at least for my options.
And why do you want to fix them?
"comparison between signed and unsigned"
If compared correctly, no problem.
And,
"comparison of unsigned expression < 0 is always false"
is for the future definition change. Even if the sign of the type was changed in mysqld, it works fine.
It was remained intentionally, even if the pointed at the similar past bug report.
Why do you assure all variables' sign are not changed forever? (5.5, 6.x, 7.x....)
I don't agree with your too much "dainty" about coding.
And you seemed to ignore the intention of the code for the future.
It seems to increase possibility to cause bug in the future.
Such dainty is only for perfect code as it is.
Our patching activity will be never perfect, because the base code is changing always.
We should prepare to the changes of the base, always.
I'd like to take "safeness for future porting of the patches" rather than "dainty".
Though, I will check the other warnings.