flatpak / xdg-dbus-proxy

GNU Lesser General Public License v2.1
53 stars 21 forks source link

Silence GCC warnings about size of Buffer #28

Closed alexlarsson closed 2 years ago

alexlarsson commented 2 years ago

Buffer contains a default size of data that is 16 bytes, so that it can be used on the stack for reading the header. However we also support passing in sizes smaller that 16, which will allocate a smaller object than the full Buffer object. This is safe as we respect the size member, however there is no way for GCC to know this, so we silence it manually.