Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msys2: huge amount of warnings like : "warning: too many arguments for format" #274

Closed
vtorri opened this issue Jun 23, 2020 · 1 comment

Comments

@vtorri
Copy link
Contributor

vtorri commented Jun 23, 2020

example :

  CC       ex_output.o
In file included from ex_output.c:26:
ex_output.c: In function 'test_pass_fn':
../src/check.h:537:44: warning: too many arguments for format [-Wformat-extra-args]
  537 |      _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
      |                                            ^~~~~~~~~~~~~
ex_output.c:31:5: note: in expansion of macro 'ck_assert_msg'
   31 |     ck_assert_msg(1 == 1, "Shouldn't see this");
      |     ^~~~~~~~~~~~~
ex_output.c: In function 'test_fail_fn':
../src/check.h:556:65: warning: too many arguments for format [-Wformat-extra-args]
  556 | #define ck_abort_msg(...) _ck_assert_failed(__FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL)
      |                                                                 ^~~~~~~~
ex_output.c:37:5: note: in expansion of macro 'ck_abort_msg'
   37 |     ck_abort_msg("Failure");
      |     ^~~~~~~~~~~~
ex_output.c: In function 'test_pass2_fn':
../src/check.h:537:44: warning: too many arguments for format [-Wformat-extra-args]
  537 |      _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
      |                                            ^~~~~~~~~~~~~
ex_output.c:66:5: note: in expansion of macro 'ck_assert_msg'
   66 |     ck_assert_msg(1 == 1, "Shouldn't see this");
      |     ^~~~~~~~~~~~~
ex_output.c: In function 'test_loop_fn':
../src/check.h:537:44: warning: too many arguments for format [-Wformat-extra-args]
  537 |      _ck_assert_failed(__FILE__, __LINE__, "Assertion '"#expr"' failed" , ## __VA_ARGS__, NULL)
      |                                            ^~~~~~~~~~~~~
ex_output.c:72:5: note: in expansion of macro 'ck_assert_msg'
   72 |     ck_assert_msg(_i == 1, "Iteration %d failed", _i);
      |     ^~~~~~~~~~~~~
ex_output.c: In function 'test_xml_esc_fail_msg_fn':
../src/check.h:556:65: warning: too many arguments for format [-Wformat-extra-args]
  556 | #define ck_abort_msg(...) _ck_assert_failed(__FILE__, __LINE__, "Failed" , ## __VA_ARGS__, NULL)
      |                                                                 ^~~~~~~~
ex_output.c:78:5: note: in expansion of macro 'ck_abort_msg'
   78 |     ck_abort_msg("fail \" ' < > & \x9 \xA" "X""\x08"" message"); /* backspace char \x08 deletes the X */
      |     ^~~~~~~~~~~~
  CCLD     ex_output.exe
@brarcher
Copy link
Contributor

This should now be resolved in #272. The MSYS2 build (nor the other builds) have this now. See this for an example.

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

No branches or pull requests

2 participants