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

Various Compile Warnings With GCC 6 #210

Closed
Mako88 opened this issue Aug 24, 2016 · 4 comments
Closed

Various Compile Warnings With GCC 6 #210

Mako88 opened this issue Aug 24, 2016 · 4 comments

Comments

@Mako88
Copy link
Collaborator

Mako88 commented Aug 24, 2016

After dealing with my Windows environment for way too long, I've decided to switch back to cross-compiling from Arch Linux using mingw. This is using GCC 6.

When I did, I got the following warnings:

similar/main/gameseg.cpp: In function ‘dcx::segmasks d1x::get_seg_masks(const dcx::vms_vector&, d1x::vcsegptr_t, dcx::fix)’:
similar/main/gameseg.cpp:304:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
     if (dist < -PLANE_DIST_TOLERANCE) //in front of face
     ^~
similar/main/gameseg.cpp:307:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
      masks.facemask |= facebit;
      ^~~~~
similar/main/gameseg.cpp:340:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    if (dist < -PLANE_DIST_TOLERANCE)
    ^~
similar/main/gameseg.cpp:343:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
     masks.facemask |= facebit;
     ^~~~~
similar/main/gameseg.cpp: In function ‘d1x::segptridx_t d1x::trace_segs(const dcx::vms_vector&, d1x::vsegptridx_t, int, dcx::visited_segment_bitarray_t&)’:
similar/main/gameseg.cpp:583:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
   for (sidenum = 0, bit = 1; sidenum < 6; sidenum++, bit <<= 1)
   ^~~
similar/main/gameseg.cpp:590:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
    if (biggest_side == -1)
    ^~
similar/main/render.cpp: In function ‘void d1x::render_mine(segnum_t, dcx::fix, d1x::window_rendered_data&)’:
similar/main/render.cpp:1604:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
       if (Viewer->type!=OBJ_ROBOT)
       ^~
similar/main/render.cpp:1607:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
      for (sn=0; sn<MAX_SIDES_PER_SEGMENT; sn++)
      ^~~
similar/main/render.cpp:1655:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
       if (Viewer->type!=OBJ_ROBOT)
       ^~
similar/main/render.cpp:1658:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
      for (sn=0; sn<MAX_SIDES_PER_SEGMENT; sn++)
      ^~~
similar/main/multi.cpp: In function ‘kmatrix_result d1x::multi_endlevel_score()’:
similar/main/multi.cpp:533:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if (Game_wind && game_wind_visible)
  ^~
similar/main/multi.cpp:536:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         return rval;
         ^~~~~~
similar/main/net_udp.cpp: In function ‘int net_udp_noloss_validate_mdata(uint32_t, ubyte, const dcx::_sockaddr&)’:
similar/main/net_udp.cpp:4895:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if (sender_addr != Netgame.players[sender_pnum].protocol.udp.addr)
  ^~
similar/main/net_udp.cpp:4899:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         memset(&buf,0,sizeof(buf));
         ^~~~~~
In file included from common/include/palette.h:34:0,
                 from common/include/fwd-gr.h:25,
                 from common/include/gr.h:28,
                 from common/include/window.h:19,
                 from similar/main/net_udp.cpp:18:
similar/main/net_udp.cpp: At global scope:
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:3581:6: note: in expansion of macro ‘nm_messagebox’
      nm_messagebox ("Sorry",1,TXT_OK,"You can't change those for coop!");
      ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:3569:6: note: in expansion of macro ‘nm_messagebox’
      nm_messagebox ("Sorry",1,TXT_OK,"You can't change those for coop!");
      ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:3545:3: note: in expansion of macro ‘nm_messagebox’
   nm_messagebox(TXT_ERROR, 1, TXT_OK, "Packet value out of range\nSetting value to %i", MIN_PPS);
   ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:3539:3: note: in expansion of macro ‘nm_messagebox’
   nm_messagebox(TXT_ERROR, 1, TXT_OK, "Packet value out of range\nSetting value to %i",MAX_PPS);
   ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:553:3: note: in expansion of macro ‘nm_messagebox’
   nm_messagebox(TXT_ERROR, 1, TXT_OK, "Address too big for host\n%s", host);
   ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_con_printf()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/include/console.h:64:2: note: in expansion of macro ‘dxx_call_printf_checked’
  dxx_call_printf_checked(con_printf,con_puts_literal,(A1),(F),##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~
similar/main/net_udp.cpp:552:3: note: in expansion of macro ‘con_printf’
   con_printf(CON_URGENT, "Address too big for host %s", host);
   ^~~~~~~~~~
common/include/console.h:58:30: warning: ‘void {anonymous}::dxx_trap_trailing_newline()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trailing_newline, "trailing literal newline on con_printf"), 0)),
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/console.h:63:2: note: in expansion of macro ‘_dxx_con_printf_check_trailing_newline’
  _dxx_con_printf_check_trailing_newline(F) \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
similar/main/net_udp.cpp:552:3: note: in expansion of macro ‘con_printf’
   con_printf(CON_URGENT, "Address too big for host %s", host);
   ^~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:545:3: note: in expansion of macro ‘nm_messagebox’
   nm_messagebox( TXT_ERROR, 1, TXT_OK, "Could not resolve address\n%s", host );
   ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_con_printf()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/include/console.h:64:2: note: in expansion of macro ‘dxx_call_printf_checked’
  dxx_call_printf_checked(con_printf,con_puts_literal,(A1),(F),##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~
similar/main/net_udp.cpp:544:3: note: in expansion of macro ‘con_printf’
   con_printf( CON_URGENT, "udp_dns_filladdr (getaddrinfo) failed for host %s", host );
   ^~~~~~~~~~
common/include/console.h:58:30: warning: ‘void {anonymous}::dxx_trap_trailing_newline()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trailing_newline, "trailing literal newline on con_printf"), 0)),
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/console.h:63:2: note: in expansion of macro ‘_dxx_con_printf_check_trailing_newline’
  _dxx_con_printf_check_trailing_newline(F) \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
similar/main/net_udp.cpp:544:3: note: in expansion of macro ‘con_printf’
   con_printf( CON_URGENT, "udp_dns_filladdr (getaddrinfo) failed for host %s", host );
   ^~~~~~~~~~
similar/main/fireball.cpp: In function ‘d1x::objptridx_t d1x::object_create_explosion_sub(d1x::objptridx_t, d1x::vsegptridx_t, const dcx::vms_vector&, dcx::fix, int, dcx::fix, dcx::fix, dcx::fix, d1x::cobjptridx_t)’:
similar/main/fireball.cpp:254:10: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
          if (killer != ConsoleObject)  // if someone else whacks you, cut force by 2x
          ^~
similar/main/fireball.cpp:255:27: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
           vforce2.x /= 2; vforce2.y /= 2; vforce2.z /= 2;
                           ^~~~~~~
similar/arch/ogl/ogl.cpp: In function ‘int dcx::ogl_loadtexture(const uint8_t*, int, int, ogl_texture&, int, int, int)’:
similar/arch/ogl/ogl.cpp:1508:2: warning: nonnull argument ‘data’ compared to NULL [-Wnonnull-compare]
  if (data) {
  ^~
similar/main/kconfig.cpp: In function ‘void kc_change_mouseaxis({anonymous}::kc_menu&, const dcx::d_event&, {anonymous}::kc_mitem&)’:
similar/main/kconfig.cpp:1489:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
  else
  ^~~~
similar/main/kconfig.cpp:1491:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
   kc_set_exclusive_binding(menu, mitem, BT_MOUSE_AXIS, code);
   ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from common/include/palette.h:34:0,
                 from common/include/fwd-gr.h:25,
                 from common/include/gr.h:28,
                 from common/main/cli.cpp:33:
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_con_printf()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/include/console.h:64:2: note: in expansion of macro ‘dxx_call_printf_checked’
  dxx_call_printf_checked(con_printf,con_puts_literal,(A1),(F),##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~
common/main/cli.cpp:323:2: note: in expansion of macro ‘con_printf’
  con_printf(CON_NORMAL, "con%c%s", g_prompt_strings[0], p);
  ^~~~~~~~~~
common/include/console.h:58:30: warning: ‘void {anonymous}::dxx_trap_trailing_newline()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trailing_newline, "trailing literal newline on con_printf"), 0)),
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/console.h:63:2: note: in expansion of macro ‘_dxx_con_printf_check_trailing_newline’
  _dxx_con_printf_check_trailing_newline(F) \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/cli.cpp:323:2: note: in expansion of macro ‘con_printf’
  con_printf(CON_NORMAL, "con%c%s", g_prompt_strings[0], p);
  ^~~~~~~~~~
similar/main/fvi.cpp: In function ‘int fvi_sub(dcx::vms_vector&, segnum_t&, const dcx::vms_vector&, d1x::vcsegptridx_t, const dcx::vms_vector&, dcx::fix, d1x::cobjptridx_t, std::pair<const short unsigned int*, const short unsigned int*>, int, fvi_info::segment_array_t&, segnum_t, {anonymous}::fvi_segments_visited_t&)’:
similar/main/fvi.cpp:837:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    if (obj_in_list(objnum, ignore_obj_list))
    ^~
similar/main/fvi.cpp:839:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
     int fudged_rad = rad;
     ^~~
similar/main/menu.cpp: In function ‘int select_file_recursive2(const char*, const char*, const partial_range_t<const char (*)[5]>&, int, {anonymous}::select_file_subfunction<void>, void*)’:
similar/main/menu.cpp:1791:56: warning: nonnull argument ‘orig_path’ compared to NULL [-Wnonnull-compare]
  if (orig_path && strncmp(orig_path, sep, strlen(sep)) && PHYSFSX_exists(orig_path,0))
similar/main/fireball.cpp: In function ‘d2x::objptridx_t d2x::object_create_explosion_sub(d2x::objptridx_t, d2x::vsegptridx_t, const dcx::vms_vector&, dcx::fix, int, dcx::fix, dcx::fix, dcx::fix, d2x::cobjptridx_t)’:
similar/main/fireball.cpp:254:10: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
          if (killer != ConsoleObject)  // if someone else whacks you, cut force by 2x
          ^~
similar/main/fireball.cpp:255:27: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
           vforce2.x /= 2; vforce2.y /= 2; vforce2.z /= 2;
                           ^~~~~~~
similar/main/fvi.cpp: In function ‘int fvi_sub(dcx::vms_vector&, segnum_t&, const dcx::vms_vector&, d2x::vcsegptridx_t, const dcx::vms_vector&, dcx::fix, d2x::cobjptridx_t, std::pair<const short unsigned int*, const short unsigned int*>, int, fvi_info::segment_array_t&, segnum_t, {anonymous}::fvi_segments_visited_t&)’:
similar/main/fvi.cpp:837:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    if (obj_in_list(objnum, ignore_obj_list))
    ^~
similar/main/fvi.cpp:839:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
     int fudged_rad = rad;
     ^~~
similar/main/gameseg.cpp: In function ‘dcx::segmasks d2x::get_seg_masks(const dcx::vms_vector&, d2x::vcsegptr_t, dcx::fix)’:
similar/main/gameseg.cpp:304:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
     if (dist < -PLANE_DIST_TOLERANCE) //in front of face
     ^~
similar/main/gameseg.cpp:307:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
      masks.facemask |= facebit;
      ^~~~~
similar/main/gameseg.cpp:340:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    if (dist < -PLANE_DIST_TOLERANCE)
    ^~
similar/main/gameseg.cpp:343:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
     masks.facemask |= facebit;
     ^~~~~
similar/main/gameseg.cpp: In function ‘d2x::segptridx_t d2x::trace_segs(const dcx::vms_vector&, d2x::vsegptridx_t, int, dcx::visited_segment_bitarray_t&)’:
similar/main/gameseg.cpp:583:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
   for (sidenum = 0, bit = 1; sidenum < 6; sidenum++, bit <<= 1)
   ^~~
similar/main/gameseg.cpp:590:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
    if (biggest_side == -1)
    ^~
similar/main/kconfig.cpp: In function ‘void kc_change_mouseaxis({anonymous}::kc_menu&, const dcx::d_event&, {anonymous}::kc_mitem&)’:
similar/main/kconfig.cpp:1489:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
  else
  ^~~~
similar/main/kconfig.cpp:1491:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
   kc_set_exclusive_binding(menu, mitem, BT_MOUSE_AXIS, code);
   ^~~~~~~~~~~~~~~~~~~~~~~~
similar/main/menu.cpp: In function ‘int select_file_recursive2(const char*, const char*, const partial_range_t<const char (*)[5]>&, int, {anonymous}::select_file_subfunction<void>, void*)’:
similar/main/menu.cpp:1791:56: warning: nonnull argument ‘orig_path’ compared to NULL [-Wnonnull-compare]
  if (orig_path && strncmp(orig_path, sep, strlen(sep)) && PHYSFSX_exists(orig_path,0))

similar/main/multi.cpp: In function ‘kmatrix_result d2x::multi_endlevel_score()’:
similar/main/multi.cpp:533:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if (Game_wind && game_wind_visible)
  ^~
similar/main/multi.cpp:536:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         return rval;
         ^~~~~~
similar/main/render.cpp: In function ‘void d2x::render_mine(segnum_t, dcx::fix, d2x::window_rendered_data&)’:
similar/main/render.cpp:1604:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
       if (Viewer->type!=OBJ_ROBOT)
       ^~
similar/main/render.cpp:1607:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
      for (sn=0; sn<MAX_SIDES_PER_SEGMENT; sn++)
      ^~~
similar/main/render.cpp:1655:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
       if (Viewer->type!=OBJ_ROBOT)
       ^~
similar/main/render.cpp:1658:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
      for (sn=0; sn<MAX_SIDES_PER_SEGMENT; sn++)
      ^~~
In file included from common/main/render_state.h:5:0,
                 from similar/main/render.cpp:33:
similar/main/render.cpp: At global scope:
common/main/object.h:582:32: warning: ‘void {anonymous}::dxx_error_object_type_mismatch()’ used but never defined
    ? DXX_ALWAYS_ERROR_FUNCTION(dxx_error_object_type_mismatch, "object type mismatch") \
                                ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/main/object.h:561:29: note: in expansion of macro ‘check_warn_object_type’
 #define get_fireball_id(O) (check_warn_object_type(O, OBJ_FIREBALL, __FILE__, __LINE__), get_fireball_id(O))
                             ^~~~~~~~~~~~~~~~~~~~~~
similar/main/render.cpp:1076:69: note: in expansion of macro ‘get_fireball_id’
    if (obj_b->type == OBJ_WEAPON || (obj_b->type == OBJ_FIREBALL && get_fireball_id(*obj_b) != VCLIP_AFTERBURNER_BLOB))
                                                                     ^~~~~~~~~~~~~~~
common/main/object.h:582:32: warning: ‘void {anonymous}::dxx_error_object_type_mismatch()’ used but never defined
    ? DXX_ALWAYS_ERROR_FUNCTION(dxx_error_object_type_mismatch, "object type mismatch") \
                                ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/main/object.h:561:29: note: in expansion of macro ‘check_warn_object_type’
 #define get_fireball_id(O) (check_warn_object_type(O, OBJ_FIREBALL, __FILE__, __LINE__), get_fireball_id(O))
                             ^~~~~~~~~~~~~~~~~~~~~~
similar/main/render.cpp:1068:68: note: in expansion of macro ‘get_fireball_id’
   if (obj_a->type == OBJ_WEAPON || (obj_a->type == OBJ_FIREBALL && get_fireball_id(*obj_a) != VCLIP_AFTERBURNER_BLOB))
                                                                    ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp: In function ‘int net_udp_noloss_validate_mdata(uint32_t, ubyte, const dcx::_sockaddr&)’:
similar/main/net_udp.cpp:4895:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if (sender_addr != Netgame.players[sender_pnum].protocol.udp.addr)
  ^~
similar/main/net_udp.cpp:4899:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
         memset(&buf,0,sizeof(buf));
         ^~~~~~
In file included from common/include/palette.h:34:0,
                 from common/include/fwd-gr.h:25,
                 from common/include/gr.h:28,
                 from common/include/window.h:19,
                 from similar/main/net_udp.cpp:18:
similar/main/net_udp.cpp: At global scope:
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:3581:6: note: in expansion of macro ‘nm_messagebox’
      nm_messagebox ("Sorry",1,TXT_OK,"You can't change those for coop!");
      ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:3569:6: note: in expansion of macro ‘nm_messagebox’
      nm_messagebox ("Sorry",1,TXT_OK,"You can't change those for coop!");
      ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:3545:3: note: in expansion of macro ‘nm_messagebox’
   nm_messagebox(TXT_ERROR, 1, TXT_OK, "Packet value out of range\nSetting value to %i", MIN_PPS);
   ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:3539:3: note: in expansion of macro ‘nm_messagebox’
   nm_messagebox(TXT_ERROR, 1, TXT_OK, "Packet value out of range\nSetting value to %i",MAX_PPS);
   ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:553:3: note: in expansion of macro ‘nm_messagebox’
   nm_messagebox(TXT_ERROR, 1, TXT_OK, "Address too big for host\n%s", host);
   ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_con_printf()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/include/console.h:64:2: note: in expansion of macro ‘dxx_call_printf_checked’
  dxx_call_printf_checked(con_printf,con_puts_literal,(A1),(F),##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~
similar/main/net_udp.cpp:552:3: note: in expansion of macro ‘con_printf’
   con_printf(CON_URGENT, "Address too big for host %s", host);
   ^~~~~~~~~~
common/include/console.h:58:30: warning: ‘void {anonymous}::dxx_trap_trailing_newline()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trailing_newline, "trailing literal newline on con_printf"), 0)),
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/console.h:63:2: note: in expansion of macro ‘_dxx_con_printf_check_trailing_newline’
  _dxx_con_printf_check_trailing_newline(F) \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
similar/main/net_udp.cpp:552:3: note: in expansion of macro ‘con_printf’
   con_printf(CON_URGENT, "Address too big for host %s", host);
   ^~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_vnm_messagebox_aN()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:286:40: note: in expansion of macro ‘dxx_call_printf_checked’
 #define vnm_messagebox_aN(A1,A2,F,...) dxx_call_printf_checked(vnm_messagebox_aN,nm_messagebox_str,(A1,A2),(F),##__VA_ARGS__)
                                        ^~~~~~~~~~~~~~~~~~~~~~~
common/main/newmenu.h:276:42: note: in expansion of macro ‘vnm_messagebox_aN’
 #define nm_messagebox_a1(T,A1    ,F,...) vnm_messagebox_aN(T,nm_messagebox_tie(A1   ),F,##__VA_ARGS__)
                                          ^~~~~~~~~~~~~~~~~
common/main/newmenu.h:275:32: note: in expansion of macro ‘nm_messagebox_a1’
 #define nm_messagebox(T,N,...) nm_messagebox_a##N((T), ##__VA_ARGS__)
                                ^~~~~~~~~~~~~~~
similar/main/net_udp.cpp:545:3: note: in expansion of macro ‘nm_messagebox’
   nm_messagebox( TXT_ERROR, 1, TXT_OK, "Could not resolve address\n%s", host );
   ^~~~~~~~~~~~~
common/include/fmtcheck.h:20:30: warning: ‘void {anonymous}::dxx_trap_trivial_string_specifier_argument_con_printf()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trivial_string_specifier_argument_##V, "bare %s argument to " #V "; use " #P " directly"), 0)))
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/fmtcheck.h:28:3: note: in expansion of macro ‘DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_’
   DXX_PRINTF_CHECK_HAS_NONTRIVIAL_FORMAT_STRING_(V, P, FMT), \
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common/include/console.h:64:2: note: in expansion of macro ‘dxx_call_printf_checked’
  dxx_call_printf_checked(con_printf,con_puts_literal,(A1),(F),##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~
similar/main/net_udp.cpp:544:3: note: in expansion of macro ‘con_printf’
   con_printf( CON_URGENT, "udp_dns_filladdr (getaddrinfo) failed for host %s", host );
   ^~~~~~~~~~
common/include/console.h:58:30: warning: ‘void {anonymous}::dxx_trap_trailing_newline()’ used but never defined
   (DXX_ALWAYS_ERROR_FUNCTION(dxx_trap_trailing_newline, "trailing literal newline on con_printf"), 0)),
                              ^
./dxxsconf.h:45:7: note: in definition of macro ‘DXX_ALWAYS_ERROR_FUNCTION’
  void F() __attribute_error(S); \
       ^
common/include/console.h:63:2: note: in expansion of macro ‘_dxx_con_printf_check_trailing_newline’
  _dxx_con_printf_check_trailing_newline(F) \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
similar/main/net_udp.cpp:544:3: note: in expansion of macro ‘con_printf’
   con_printf( CON_URGENT, "udp_dns_filladdr (getaddrinfo) failed for host %s", host );
   ^~~~~~~~~~
similar/arch/ogl/ogl.cpp: In function ‘int dcx::ogl_loadtexture(const uint8_t*, int, int, ogl_texture&, int, int, int)’:
similar/arch/ogl/ogl.cpp:1508:2: warning: nonnull argument ‘data’ compared to NULL [-Wnonnull-compare]
  if (data) {
  ^~
@Mako88
Copy link
Collaborator Author

Mako88 commented Aug 25, 2016

Apparently there's a bug in mingw-w64-gcc 6.1.1, so I had to downgrade to 5.3.0. However, it can't hurt to go ahead and fix the warnings thrown with GCC 6.

@Mako88 Mako88 changed the title Various Compile Warnings Various Compile Warnings With GCC 6 Aug 25, 2016
@vLKp
Copy link
Contributor

vLKp commented Aug 25, 2016

I will look at fixing these when I get around to installing gcc 6 here.

The warnings from -Wmisleading-indentation are a good idea in theory, but applying them to code that has been maintained by many people over 20 years will cause quite a bit of noise. Some of the sites it is reporting are ones where the whitespace became unusual specifically to avoid creating commits with extensive reindenting, since those make a mess of later uses of git blame. I see at least one real bug highlighted by that warning though, which is interesting. Git blame says it was wrong when the code was first imported in 2001, so it was probably always wrong.

The warning about a used but undefined function is strange. I intend for that function to be undefined and calls to it optimized out. I am not sure how to get gcc to be quiet about that.

@vLKp
Copy link
Contributor

vLKp commented Sep 26, 2016

I pushed changes to address the warnings about __attribute__((nonnull)). Resolving the indentation warnings will cause considerable churn, so I have not done that for now.

I have not had time to investigate the used-but-never-defined warning, although it appears to apply only when macro DXX_ALWAYS_ERROR_FUNCTION is expanded in a function in an anonymous namespace. Usage in the global namespace or in a named namespace is accepted without issue. Older gcc allows use in anonymous namespaces. Since this macro always generates a call to an undefined function, regardless of the active namespace, it seems strange that gcc warns in some cases and not others. I suspect that it warns in the anonymous case because it can prove that the function is undefined, and defers non-anonymous uses until a later stage. The optimizer then deletes the call before the warning can be issued for the non-anonymous case.

@vLKp
Copy link
Contributor

vLKp commented Jul 9, 2017

Add workaround for unwanted gcc-6 "used but never defined" warning (pushed about a month ago) should prevent that warning.

@zicodxx fixed at least some of the indentation warnings in Fixed misleading indentations.

The code currently builds clean for me with gcc-7 (not gcc-6 as reported, but since gcc-7 is generally stricter, I consider this close enough). Please reopen if you still see issues with gcc-6. Closing.

@vLKp vLKp closed this as completed Jul 9, 2017
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