https://bugs.winehq.org/show_bug.cgi?id=47126
Bug ID: 47126 Summary: GCC 9.x compilation warnings for Wine 4.7 Product: Wine Version: 4.7 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: aros@gmx.com Distribution: ---
1. _________________________________________________________ winevdm.c _________________________________________________________
winevdm.c: In function ‘main’: winevdm.c:337:24: warning: ‘%s’ directive writing up to 259 bytes into a region of size 128 [-Wformat-overflow=] 337 | sprintf( buf, "%s\nInvalid startup directory. Check your pif file.", | ^~ winevdm.c:337:9: note: ‘sprintf’ output between 49 and 308 bytes into a destination of size 128 337 | sprintf( buf, "%s\nInvalid startup directory. Check your pif file.", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 338 | filename); | ~~~~~~~~~ winevdm.c:343:24: warning: ‘%s’ directive writing up to 259 bytes into a region of size 128 [-Wformat-overflow=] 343 | sprintf( buf, "%s\nInvalid program file name. Check your pif file.", | ^~ winevdm.c:343:9: note: ‘sprintf’ output between 49 and 308 bytes into a destination of size 128 343 | sprintf( buf, "%s\nInvalid program file name. Check your pif file.", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 344 | filename); | ~~~~~~~~~ winevdm.c:325:24: warning: ‘%s’ directive writing up to 259 bytes into a region of size 128 [-Wformat-overflow=] 325 | sprintf( buf, "%s\nInvalid file format. Check your pif file.", | ^~ winevdm.c:325:9: note: ‘sprintf’ output between 43 and 302 bytes into a destination of size 128 325 | sprintf( buf, "%s\nInvalid file format. Check your pif file.", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 326 | filename); | ~~~~~~~~~ 2. _________________________________________________________ winhelp.c _________________________________________________________
winhelp.c: In function ‘WINHELP_GetWindowInfo’: winhelp.c:280:60: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 50 [-Wformat-truncation=] 280 | snprintf(mwi.caption, sizeof(mwi.caption), "%s %s - %s", | ^~ 281 | hlpfile->lpszTitle, tmp, hlpfile->lpszPath); | ~~~ winhelp.c:280:13: note: ‘snprintf’ output 5 or more bytes (assuming 132) into a destination of size 51 280 | snprintf(mwi.caption, sizeof(mwi.caption), "%s %s - %s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 281 | hlpfile->lpszTitle, tmp, hlpfile->lpszPath); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3. _________________________________________________________ winemenubuilder.c _________________________________________________________
winemenubuilder.c: In function ‘InvokeShellLinker’: winemenubuilder.c:2887:14: warning: array subscript -1 is outside array bounds of ‘WCHAR[1024]’ {aka ‘short unsigned int[1024]’} [-Warray-bounds] 2887 | p[-1] = '"'; | ~^~~~ winemenubuilder.c:2783:11: note: while referencing ‘szArgs’ 2783 | WCHAR szArgs[INFOTIPSIZE], szIconPath[MAX_PATH], szWMClass[MAX_PATH]; | ^~~~~~
4. _________________________________________________________ debug.h _________________________________________________________
In file included from dn.c:35: ../../include/wine/debug.h:497:48: warning: ‘__wine_dbch___default’ defined but not used [-Wunused-const-variable=] 497 | static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch | ^~~~~~~~~~~~~~~~~~~~~ dn.c:37:1: note: in expansion of macro ‘WINE_DEFAULT_DEBUG_CHANNEL’ 37 | WINE_DEFAULT_DEBUG_CHANNEL(wldap32); | ^~
5. _________________________________________________________ arb_program_shader.c _________________________________________________________
arb_program_shader.c: In function ‘shader_arb_get_register_name’: arb_program_shader.c:993:55: warning: ‘%s’ directive output may be truncated writing up to 49 bytes into a region of size 20 [-Wformat-truncation=] 993 | snprintf(priv->addr_reg, sizeof(priv->addr_reg), "%s", src); | ^~ ...... 1127 | shader_arb_request_a0(ins, rel_reg); | ~~~~~~~ arb_program_shader.c:993:5: note: ‘snprintf’ output between 1 and 50 bytes into a destination of size 20 993 | snprintf(priv->addr_reg, sizeof(priv->addr_reg), "%s", src); |
6. _________________________________________________________ mmdevdrv.c _________________________________________________________
mmdevdrv.c: In function ‘AUDDRV_GetAudioEndpoint’: mmdevdrv.c:644:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size 60 [-Wformat-overflow=] 644 | sprintf(dev_node_name, "pcm.%s", name); | ^~ ...... 813 | if(handle_underrun && ((lconf = make_handle_underrun_config(alsa_name)))){ | ~~~~~~~~~ mmdevdrv.c:644:5: note: ‘sprintf’ output between 5 and 260 bytes into a destination of size 64 644 | sprintf(dev_node_name, "pcm.%s", name); |
7. _________________________________________________________ dsm_ctrl.c _________________________________________________________
In file included from dsm_ctrl.c:34: dsm_ctrl.c: In function ‘TWAIN_OpenDS’: ../../include/wine/debug.h:93:5: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 93 | wine_dbg_log( __dbcl, __dbch, __FUNCTION__, args); } } while(0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../include/wine/debug.h:90:8: note: in expansion of macro ‘__WINE_DBG_LOG’ 90 | __WINE_DBG_LOG | ^~~~~~~~~~~~~~ ../../include/wine/debug.h:489:36: note: in expansion of macro ‘__WINE_DPRINTF’ 489 | #define WINE_ERR __WINE_DPRINTF(_ERR,__wine_dbch___default) | ^~~~~~~~~~~~~~ ../../include/wine/debug.h:528:36: note: in expansion of macro ‘WINE_ERR’ 528 | #define ERR WINE_ERR | ^~~~~~~~ dsm_ctrl.c:322:3: note: in expansion of macro ‘ERR’ 322 | ERR("Failed to load TWAIN Source %s\n", modname); | ^~~ dsm_ctrl.c:322:36: note: format string is defined here 322 | ERR("Failed to load TWAIN Source %s\n", modname); | ^~
8. _________________________________________________________ oleaut.c _________________________________________________________
oleaut.c: In function ‘get_typeinfo_for_iid’: oleaut.c:876:39: warning: ‘%s’ directive writing up to 99 bytes into a region of size between 92 and 291 [-Wformat-overflow=] 876 | sprintf(typelibkey, "Typelib\%s\%s\0\win%u", tlguid, ver, sizeof(void *) == 8 ? 64 : 32); | ^~ ~~~ oleaut.c:876:5: note: ‘sprintf’ output between 18 and 316 bytes into a destination of size 300 876 | sprintf(typelibkey, "Typelib\%s\%s\0\win%u", tlguid, ver, sizeof(void *) == 8 ? 64 : 32); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9. _________________________________________________________ ppl.l _________________________________________________________
ppl.l: In function ‘pp_do_include’: ppl.l:1624:3: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 1624 | pp_status.input, pp_status.line_number, pp_incl_state.state, pp_incl_state.ppp, pp_incl_state.ifdepth); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1625 | pp_status.file = fp; | ~~~~~~~~~~~~~~~~~~~~
https://bugs.winehq.org/show_bug.cgi?id=47126
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- Confirming.
https://bugs.winehq.org/show_bug.cgi?id=47126
Artem S. Tashkinov aros@gmx.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Artem S. Tashkinov aros@gmx.com --- Most have been fixed (except a ppl warning), so I guess we may close this bug report.
https://bugs.winehq.org/show_bug.cgi?id=47126
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.0-rc1.