]> granicus.if.org Git - pdns/commit
Revert EDNS0Record to a trivial type
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 31 May 2018 14:26:39 +0000 (16:26 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 31 May 2018 14:26:39 +0000 (16:26 +0200)
commit0e55cc962d8ee2666a2d990fd65dad1eb6129043
tree611126b120300f241018cab2032da80efcddfdc2
parentce633f7804e765481a7d7c14a1d6b0eecdc73d5d
Revert EDNS0Record to a trivial type

Adding brace initializers makes it non-trivial, which does not seem
like a very good idea for a packed structure.
gcc 8.1.0 complains with:

```
warning: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘struct EDNS0Record’ from an array of ‘uint32_t’ {aka ‘unsigned int’} [-Wclass-memaccess]
         memcpy(&stuff, &ttl, sizeof(stuff));
```
pdns/dns.hh