Skip to content

Commit

Permalink
Cygwin: accommodate gcc -Og option
Browse files Browse the repository at this point in the history
All three warnings produced with -Og are false positives.
But given we're using -Werror unconditionally it's better
to be safe than sorry.

Reported-by: Kevin Ushey <kevinushey@gmail.com>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
(cherry picked from commit 2a2a648)
  • Loading branch information
github-cygwin authored and kbrow1i committed Sep 12, 2024
1 parent 37ab3e0 commit 784ce7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion winsup/cygwin/fhandler/fifo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ fhandler_fifo::create_shmem (bool only_open)
{
HANDLE sect;
OBJECT_ATTRIBUTES attr;
NTSTATUS status;
NTSTATUS status = STATUS_SUCCESS;
LARGE_INTEGER size = { .QuadPart = sizeof (fifo_shmem_t) };
SIZE_T viewsize = sizeof (fifo_shmem_t);
PVOID addr = NULL;
Expand Down
2 changes: 1 addition & 1 deletion winsup/cygwin/tty.cc
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ tty::wait_fwd ()
thread when the last data is transfered. */
const ULONGLONG sleep_in_nat_pipe = 16;
const ULONGLONG time_to_wait = sleep_in_nat_pipe * 2 + 1/* margine */;
ULONGLONG elapsed;
ULONGLONG elapsed = 0;
while (fwd_not_empty
|| (elapsed = GetTickCount64 () - fwd_last_time) < time_to_wait)
{
Expand Down
2 changes: 1 addition & 1 deletion winsup/utils/kill.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ print_version ()
static const char *
strsigno (int signo)
{
static char sigbuf[8];
static char sigbuf[32];

if (signo > 0 && signo < SIGRTMIN)
return sys_sigabbrev[signo];
Expand Down

0 comments on commit 784ce7a

Please sign in to comment.