src/os/posix/vm/os_posix.cpp

changeset 9637
eef07cd490d4
parent 9572
624a0741915c
parent 9610
f43f77de876a
child 9756
2be326848943
     1.1 --- a/src/os/posix/vm/os_posix.cpp	Wed Jul 03 20:04:13 2019 +0800
     1.2 +++ b/src/os/posix/vm/os_posix.cpp	Wed Jul 03 20:42:37 2019 +0800
     1.3 @@ -604,7 +604,11 @@
     1.4    strncpy(buffer, "none", size);
     1.5  
     1.6    const struct {
     1.7 -    int i;
     1.8 +    // NB: i is an unsigned int here because SA_RESETHAND is on some
     1.9 +    // systems 0x80000000, which is implicitly unsigned.  Assignining
    1.10 +    // it to an int field would be an overflow in unsigned-to-signed
    1.11 +    // conversion.
    1.12 +    unsigned int i;
    1.13      const char* s;
    1.14    } flaginfo [] = {
    1.15      { SA_NOCLDSTOP, "SA_NOCLDSTOP" },

mercurial