Skip to content

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

@vtorri

Description

@vtorri

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions