Skip to content
Myr

Fix release build with GCC 11.x

Before adoption: this commit came in with the history the project adopted, so no landing records it.

meson in release build mode (with GCC) triggers following compiler error: In file included from ../source/clipboard.c:14: ../source/clipboard.c: In function ‘select_mime_type_for_offer’: ../source/log.h:58:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 58 | log_msg(LOG_CLASS_DEBUG, LOG_MODULE, __FILE__, __LINE__, fmt, ## __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../source/clipboard.c:81:5: note: in expansion of macro ‘LOG_DBG’ 81 | LOG_DBG("mime-type: %s -> %s (offered type was %s)", | ^~~~~~~ ../source/clipboard.c:81:31: note: format string is defined here 81 | LOG_DBG("mime-type: %s -> %s (offered type was %s)", | ^~ Fixes #420

authored by Ashish SHUKLA · committed by Daniel Eklöf · parent e39571a · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:clipboard.c+3 added-1 removed
77 unmodified lines
78 }79 }8081 LOG_DBG("mime-type: %s -> %s (offered type was %s)",82 mime_type_map[*type], mime_type_map[mime_type], _mime_type);82 mime_type_map[*type],83 (mime_type_map[mime_type] == NULL ? "(null)" : mime_type_map[mime_type]),84 _mime_type);8586 /* Mime-type transition; if the new mime-type is "better" than87 * previously offered types, use the new type */88
662 unmodified lines