Bug #13814
Updated by Toomas Soome about 1 year ago
Build errors with gcc 10:
<pre>
In file included from db_mindex.cc:34:
db_mindex.cc: In member function 'entry_object** db_mindex::prepare_results(int, db_index_entry_p, db_status*)':
db_headers.h:184:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
184 | if (this != 0) { \
| ^~
db_mindex.cc:328:3: note: in expansion of macro 'READUNLOCK2'
328 | READUNLOCK2(this, table, NULL, NULL,
| ^~~~~~~~~~~
db_headers.h:184:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
184 | if (this != 0) { \
| ^~
db_mindex.cc:349:2: note: in expansion of macro 'READUNLOCK2'
349 | READUNLOCK2(this, table, entries, entries,
| ^~~~~~~~~~~
db_headers.h:174:4: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
174 | if (that != 0) { \
| ^~
db_mindex.cc:323:2: note: in expansion of macro 'READLOCK2'
323 | READLOCK2(table, NULL, "r table db_mindex::prepare_results", this);
| ^~~~~~~~~
db_mindex.cc: In member function 'db_status db_mindex::first(entryp*, entry_object**)':
db_headers.h:184:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
184 | if (this != 0) { \
| ^~
db_mindex.cc:461:2: note: in expansion of macro 'READUNLOCK2'
461 | READUNLOCK2(this, table, ret, ret,
| ^~~~~~~~~~~
db_headers.h:184:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
184 | if (this != 0) { \
| ^~
db_mindex.cc:448:5: note: in expansion of macro 'READUNLOCK2'
448 | READUNLOCK2(this, table,
| ^~~~~~~~~~~
db_headers.h:174:4: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
174 | if (that != 0) { \
| ^~
db_mindex.cc:438:2: note: in expansion of macro 'READLOCK2'
438 | READLOCK2(table, DB_LOCK_ERROR, "r table db_mindex::first", this);
| ^~~~~~~~~
db_mindex.cc: In member function 'db_status db_mindex::next(entryp, entryp*, entry_object**)':
db_headers.h:184:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
184 | if (this != 0) { \
| ^~
db_mindex.cc:488:2: note: in expansion of macro 'READUNLOCK2'
488 | READUNLOCK2(this, table, ret, ret,
| ^~~~~~~~~~~
db_headers.h:174:4: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
174 | if (that != 0) { \
| ^~
db_mindex.cc:478:2: note: in expansion of macro 'READLOCK2'
478 | READLOCK2(table, DB_LOCK_ERROR, "r db_mindex::next", this);
| ^~~~~~~~~
db_mindex.cc: In member function 'db_status db_mindex::first(db_query*, db_next_index_desc**, entry_object**)':
db_headers.h:184:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
184 | if (this != 0) { \
| ^~
db_mindex.cc:570:2: note: in expansion of macro 'READUNLOCK2'
570 | READUNLOCK2(this, table, ret, ret,
| ^~~~~~~~~~~
db_headers.h:174:4: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
174 | if (that != 0) { \
| ^~
db_mindex.cc:550:2: note: in expansion of macro 'READLOCK2'
550 | READLOCK2(table, DB_LOCK_ERROR, "r table db_mindex::first", this);
| ^~~~~~~~~
db_mindex.cc: In member function 'db_status db_mindex::next(db_next_index_desc*, db_next_index_desc**, entry_object**)':
db_headers.h:184:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
184 | if (this != 0) { \
| ^~
db_mindex.cc:609:2: note: in expansion of macro 'READUNLOCK2'
609 | READUNLOCK2(this, table, ret, ret,
| ^~~~~~~~~~~
db_headers.h:174:4: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
174 | if (that != 0) { \
| ^~
db_mindex.cc:587:2: note: in expansion of macro 'READLOCK2'
587 | READLOCK2(table, DB_LOCK_ERROR, "r table db_mindex::next", this);
| ^~~~~~~~~
db_mindex.cc: In member function 'db_status db_mindex::remove(db_query*)':
db_headers.h:158:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
158 | if (that != 0) { \
| ^~
db_mindex.cc:848:4: note: in expansion of macro 'WRITEUNLOCK2'
848 | WRITEUNLOCK2(table, this, DB_SUCCESS, DB_SUCCESS,
| ^~~~~~~~~~~~
db_headers.h:158:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
158 | if (that != 0) { \
| ^~
db_mindex.cc:853:4: note: in expansion of macro 'WRITEUNLOCK2'
853 | WRITEUNLOCK2(table, this, DB_NOTFOUND, DB_NOTFOUND,
| ^~~~~~~~~~~~
db_headers.h:158:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
158 | if (that != 0) { \
| ^~
db_mindex.cc:863:3: note: in expansion of macro 'WRITEUNLOCK2'
863 | WRITEUNLOCK2(table, this, DB_BADQUERY, DB_BADQUERY,
| ^~~~~~~~~~~~
db_headers.h:158:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
158 | if (that != 0) { \
| ^~
db_mindex.cc:869:3: note: in expansion of macro 'WRITEUNLOCK2'
869 | WRITEUNLOCK2(table, this, DB_NOTFOUND, DB_NOTFOUND,
| ^~~~~~~~~~~~
db_headers.h:158:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
158 | if (that != 0) { \
| ^~
db_mindex.cc:877:3: note: in expansion of macro 'WRITEUNLOCK2'
877 | WRITEUNLOCK2(table, this, s, s,
| ^~~~~~~~~~~~
db_headers.h:158:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
158 | if (that != 0) { \
| ^~
db_mindex.cc:904:3: note: in expansion of macro 'WRITEUNLOCK2'
904 | WRITEUNLOCK2(table, this, DB_SUCCESS, DB_SUCCESS,
| ^~~~~~~~~~~~
db_headers.h:158:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
158 | if (that != 0) { \
| ^~
db_mindex.cc:887:5: note: in expansion of macro 'WRITEUNLOCK2'
887 | WRITEUNLOCK2(table, this, DB_INTERNAL_ERROR,
| ^~~~~~~~~~~~
db_headers.h:158:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
158 | if (that != 0) { \
| ^~
db_mindex.cc:897:5: note: in expansion of macro 'WRITEUNLOCK2'
897 | WRITEUNLOCK2(table, this, rstat, rstat,
| ^~~~~~~~~~~~
db_headers.h:145:4: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
145 | if (that != 0) { \
| ^~
db_mindex.cc:837:2: note: in expansion of macro 'WRITELOCK2'
837 | WRITELOCK2(table, DB_LOCK_ERROR, "w table db_mindex::remove", this);
| ^~~~~~~~~~
db_mindex.cc: In member function 'db_status db_mindex::add(db_query*, entry_object*)':
db_headers.h:155:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
155 | if (this != 0) { \
| ^~
db_mindex.cc:1023:2: note: in expansion of macro 'WRITEUNLOCK2'
1023 | WRITEUNLOCK2(this, table, rstat, rstat,
| ^~~~~~~~~~~~
db_headers.h:155:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
155 | if (this != 0) { \
| ^~
db_mindex.cc:962:4: note: in expansion of macro 'WRITEUNLOCK2'
962 | WRITEUNLOCK2(this, table,
| ^~~~~~~~~~~~
db_headers.h:155:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
155 | if (this != 0) { \
| ^~
db_mindex.cc:974:4: note: in expansion of macro 'WRITEUNLOCK2'
974 | WRITEUNLOCK2(this, table,
| ^~~~~~~~~~~~
db_headers.h:155:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
155 | if (this != 0) { \
| ^~
db_mindex.cc:1005:6: note: in expansion of macro 'WRITEUNLOCK2'
1005 | WRITEUNLOCK2(this, table,
| ^~~~~~~~~~~~
db_headers.h:155:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
155 | if (this != 0) { \
| ^~
db_mindex.cc:947:4: note: in expansion of macro 'WRITEUNLOCK2'
947 | WRITEUNLOCK2(this, table, rstat, rstat,
| ^~~~~~~~~~~~
db_headers.h:155:3: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
155 | if (this != 0) { \
| ^~
db_mindex.cc:938:4: note: in expansion of macro 'WRITEUNLOCK2'
938 | WRITEUNLOCK2(this, table, DB_LOCK_ERROR, DB_LOCK_ERROR,
| ^~~~~~~~~~~~
db_headers.h:145:4: error: 'nonnull' argument 'this' compared to NULL [-Werror=nonnull-compare]
145 | if (that != 0) { \
| ^~
db_mindex.cc:934:2: note: in expansion of macro 'WRITELOCK2'
934 | WRITELOCK2(table, DB_LOCK_ERROR, "w table db_mindex::add", this);
| ^~~~~~~~~~
cc1plus: all warnings being treated as errors
</pre>
Testing done: build/install/boot.