Skip to content

Fix printf security compilation warning/error#4

Open
talyz wants to merge 1 commit intoKazade:masterfrom
talyz:master
Open

Fix printf security compilation warning/error#4
talyz wants to merge 1 commit intoKazade:masterfrom
talyz:master

Conversation

@talyz
Copy link

@talyz talyz commented Jul 27, 2021

Fix the following GCC compilation error when the -Wformat-security and -Werror=format-security flags are used:

main.c: In function 'info_msg':
main.c:97:3: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
   97 |   printf(msg);
      |   ^~~~~~

Fix the following GCC compilation error when the -Wformat-security and
-Werror=format-security flags are used:

main.c: In function 'info_msg':
main.c:97:3: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
   97 |   printf(msg);
      |   ^~~~~~
@talyz talyz changed the title Fix printf security compilation error Fix printf security compilation warning/error Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant