-Wunterminated-string-initialization warning with GCC 15 in object-file.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With upcoming GCC 15, a new warning is added
(-Wunterminated-string-initialization) that fires when building git:
```
    CC object-file.o
object-file.c:52:9: warning: initializer-string for array of ‘unsigned char’ is too long [-Wunterminated-string-initialization]
   52 |         "\x6e\xf1\x9b\x41\x22\x5c\x53\x69\xf1\xc1" \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
object-file.c:79:17: note: in expansion of macro ‘EMPTY_TREE_SHA256_BIN_LITERAL’
   79 |         .hash = EMPTY_TREE_SHA256_BIN_LITERAL,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
object-file.c:61:9: warning: initializer-string for array of ‘unsigned char’ is too long [-Wunterminated-string-initialization]
   61 |         "\x47\x3a\x0f\x4c\x3b\xe8\xa9\x36\x81\xa2" \
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
object-file.c:83:17: note: in expansion of macro ‘EMPTY_BLOB_SHA256_BIN_LITERAL’
   83 |         .hash = EMPTY_BLOB_SHA256_BIN_LITERAL,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Context for the new warning is at https://gcc.gnu.org/PR115185.

thanks,
sam





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux