gdbus: annotate printf-like functions as accepting format
Printf-like functions should have the "format" argument annotated to:
1. Help in detection of format string vulnerabilities (and mistakes).
2. Satisfy -Wformat-nonliteral (-Wformat=2) warning.
This fixes clang warnings like:
gdbus/object.c:1416:31: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
vsnprintf(str, sizeof(str), format, args);
^~~~~~
src/adapter.c:255:7: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
strerror(err));
^~~~~~~~~~~~~
src/adapter.c:255:7: note: treat the string as an argument to avoid this
strerror(err));
^
"%s",
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
2 files changed