[PATCH 6/6] Cygwin: Suppress false positive use-after-free warnings in __set_lc_time_from_win()

2024-08-04 Thread Jon Turney
Supress new use-after-free warnings about realloc(), seen with gcc 12, e.g.: > In function ‘void rebase_locale_buf(const void*, const void*, const char*, > const char*, const char*)’, > inlined from ‘int __set_lc_time_from_win(const char*, const lc_time_T*, > lc_time_T*, char**, wctomb_p, co

[PATCH 4/6] Cygwin: Fix warning about narrowing conversions in tape options

2024-08-04 Thread Jon Turney
Fix a gcc 12 warning about a narrowing conversion in case labels for tape options. > In file included from /wip/cygwin/src/winsup/cygwin/include/sys/mtio.h:14, > from ../../../../src/winsup/cygwin/fhandler/tape.cc:13: > ../../../../src/winsup/cygwin/fhandler/tape.cc: In member fun

[PATCH 5/6] Cygwin: Fix warnings about narrowing conversions of socket ioctls

2024-08-04 Thread Jon Turney
Fix gcc 12 warnings about narrowing conversions of socket ioctl constants when used as case labels, e.g: > ../../../../src/winsup/cygwin/net.cc: In function ‘int get_ifconf(ifconf*, > int)’: > ../../../../src/winsup/cygwin/net.cc:1940:18: error: narrowing conversion of > ‘2152756069’ from ‘long

[PATCH 3/6] Cygwin: Fix warning about address known to be non-NULL in /proc/locales

2024-08-04 Thread Jon Turney
Fix a gcc 12 warning about an address known to be non-NULL in format_proc_locale_proc(). > ../../../../src/winsup/cygwin/fhandler/proc.cc: In function ‘BOOL > format_proc_locale_proc(LPWSTR, DWORD, LPARAM)’: > ../../../../src/winsup/cygwin/fhandler/proc.cc:2156:11: error: the address of > ‘iso15

[PATCH 2/6] Cygwin: Fix warnings about narrowing conversions of NTSTATUS constants

2024-08-04 Thread Jon Turney
Fix warnings with gcc 12 about narrowing conversions of NTSTATUS constants when used as case labels, e.g: > ../../../../src/winsup/cygwin/exceptions.cc: In static member function > ‘static int exception::handle(EXCEPTION_RECORD*, void*, CONTEXT*, > PDISPATCHER_CONTEXT)’: > ../../../../src/winsup

[PATCH 0/6] Fix/supress warnings with gcc 12

2024-08-04 Thread Jon Turney
Fix/supress warnings seen with gcc 12. Jon Turney (6): Cygwin: Suppress array-bounds warning from NtCurrentTeb() Cygwin: Fix warnings about narrowing conversions of NTSTATUS constants Cygwin: Fix warning about address known to be non-NULL in /proc/locales Cygwin: Fix warning about narr

[PATCH 1/6] Cygwin: Suppress array-bounds warning from NtCurrentTeb()

2024-08-04 Thread Jon Turney
This disables a warning seen with gcc 12 caused by intrinsics used by the inline implementation of NtCurrentTeb() inside w32api headers. > In function ‘long long unsigned int __readgsqword(unsigned int)’, > inlined from ‘_TEB* NtCurrentTeb()’ at > /usr/include/w32api/winnt.h:10020:86, > [...]