Matthias Andree 96bdb42d40 Fix GCC's -Wunterminated-string-initialization warning in edns0.c.
GCC complains that writing the five-character "ODNS\0" string into
a four-element char magic[4] array truncates the NUL character.
The warning's rationale is that this is incompatible with C++, or
maybe non-intentional.

GCC 8 has added a nonstring variable attribute, clang 20.1 does
not yet support this, but clang's Git head does.

Add an ATTRIBUTE_NONSTRING macro, currently only defined on GCC >= 8
as __attribute__ ((nonstring)).  This successfully suppresses
the warning on Fedora Linux 42's default compiler.

The alternative would be to replace the "ODNS" literal by {0} and
instead memcpy(opt.magic, "ODNS", sizeof(opt.magic)); on the next line,
which is correct, C++ compatible, but also less concise.
2025-05-21 15:06:27 +01:00
2012-04-02 20:40:34 +01:00
2024-12-24 09:47:41 +00:00
2012-01-05 17:31:15 +00:00
2018-01-14 17:32:52 +00:00
2022-05-13 21:22:11 +01:00
2012-01-05 17:31:13 +00:00
2021-06-15 23:14:59 +01:00
2025-01-23 17:08:39 +00:00
2018-01-14 17:32:52 +00:00
2024-12-18 23:58:58 +00:00
2012-01-05 22:00:08 +00:00
Description
No description provided
17 MiB
Languages
C 94.2%
Perl 2.3%
HTML 1.2%
Shell 1.1%
Makefile 0.6%
Other 0.6%