Re: [PATCH] Fix windows-nat.c for -Wnarrowing

Tom Tromey
2018-08-29T19:22:58Z

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

Eli> Why did you need to make .them be DWORD? I think it should be a
Eli> 'long', and then you can use -1L without any trouble.

Thanks for the suggestion. I tried this just now but long doesn't work
without additional casts:

../../binutils-gdb/gdb/windows-nat.c:304:1: error: narrowing conversion of '3221225477' from 'DWORD {aka long unsigned int}' to 'long int' inside { } [-Wnarrowing]
};
^
../../binutils-gdb/gdb/windows-nat.c:304:1: error: narrowing conversion of '3221225725' from 'DWORD {aka long unsigned int}' to 'long int' inside { } [-Wnarrowing]
../../binutils-gdb/gdb/windows-nat.c:304:1: error: narrowing conversion of '2147483651' from 'DWORD {aka long unsigned int}' to 'long int' inside { } [-Wnarrowing]
../../binutils-gdb/gdb/windows-nat.c:304:1: error: narrowing conversion of '2147483652' from 'DWORD {aka long unsigned int}' to 'long int' inside { } [-Wnarrowing]
../../binutils-gdb/gdb/windows-nat.c:304:1: error: narrowing conversion of '3221225614' from 'DWORD {aka long unsigned int}' to 'long int' inside { } [-Wnarrowing]

Tom