mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
f5411574af
Use explicit labels for GTypeInfo member initializers, rather than relying on comments and ordering. This is both easier to read, and harder to screw up. This also makes it clear that we're mis-casting GObject class initializers for gcc. Without this patch, g++ 8.2.0-7 produces this warning: CXX -g -O2 lib/index.o lib/index.cc: In function ‘GMimeFilter* notmuch_filter_discard_non_term_new(GMimeContentType*)’: lib/index.cc:252:23: warning: cast between incompatible function types from ‘void (*)(NotmuchFilterDiscardNonTermClass*)’ {aka ‘void (*)(_NotmuchFilterDiscardNonTermClass*)’} to ‘GClassInitFunc’ {aka ‘void (*)(void*, void*)’} [-Wcast-function-type] (GClassInitFunc) notmuch_filter_discard_non_term_class_init, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The definition of GClassInitFunc in /usr/include/glib-2.0/gobject/gtype.h suggests that this function will always be called with the class_data member of the GTypeInfo. We set that value to NULL in both GObject definitions in notmuch. So we mark it as explicitly unused. There is no functional change here, just code cleanup. |
||
---|---|---|
.. | ||
add-message.cc | ||
built-with.c | ||
config.cc | ||
database-private.h | ||
database.cc | ||
directory.cc | ||
filenames.c | ||
index.cc | ||
indexopts.c | ||
Makefile | ||
Makefile.local | ||
message-file.c | ||
message-id.c | ||
message-private.h | ||
message-property.cc | ||
message.cc | ||
messages.c | ||
notmuch-private.h | ||
notmuch.h | ||
notmuch.sym | ||
parse-time-vrp.cc | ||
parse-time-vrp.h | ||
query-fp.cc | ||
query-fp.h | ||
query.cc | ||
regexp-fields.cc | ||
regexp-fields.h | ||
sha1.c | ||
string-list.c | ||
string-map.c | ||
tags.c | ||
thread-fp.cc | ||
thread-fp.h | ||
thread.cc |