Skip to content

Commit

Permalink
Fix build regression with -Wformat-security
Browse files Browse the repository at this point in the history
Commit 547ba08 broke the build
with -Wformat-security. Add the trivial fix and ensure it stays
that way by adding -Wformat-security to our normal build flags.
  • Loading branch information
pmatilai committed Nov 5, 2024
1 parent 02f09b3 commit 83cff1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ configure_file(config.h.in config.h)

add_compile_definitions(HAVE_CONFIG_H)

add_compile_options(-Wall -Wpointer-arith -Wempty-body)
add_compile_options(-Wall -Wpointer-arith -Wempty-body -Wformat-security)
if (ENABLE_WERROR)
add_compile_options(-Werror)
endif()
Expand Down
2 changes: 1 addition & 1 deletion rpmio/rpmlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt, ..
char *msg = NULL;
va_start(ap, fmt);
if (rvasprintf(&msg, fmt, ap) >= 0) {
rpmlog(code, msg);
rpmlog(code, "%s", msg);
free(msg);
}
va_end(ap);
Expand Down

0 comments on commit 83cff1f

Please sign in to comment.