]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
meson: treat -Wattributes as error obs-knot-resolver-bs4hbr/deployments/888
authorTomas Krizek <tomas.krizek@nic.cz>
Wed, 17 Jun 2020 08:53:18 +0000 (10:53 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Wed, 17 Jun 2020 08:53:18 +0000 (10:53 +0200)
Trie relies on __attribute__(cleanup) and if its missing, it could
lead to memory leaks such as:

https://sonarcloud.io/project/issues?id=dns-oarc%3Adnsjit&issues=AXDyskhlrWLe1VCMvmVe&open=AXDyskhlrWLe1VCMvmVe

meson.build

index b901d00baf5cd6b4c610b55f5ae55418099b2868..6c0b990bc97c5fb7f8f5b61fd439f7378d3bb4d6 100644 (file)
@@ -116,6 +116,7 @@ add_project_arguments(
   '-Wtype-limits',
   '-Wshadow',
   '-Werror=implicit-function-declaration', # Probably messed up includes; implicit functions are evil!
+  '-Werror=attributes',  # Missing cleanup attribute could lead to memory leaks.
   '-fvisibility=hidden',
   '-DHAVE_ASPRINTF=' + have_asprintf.to_int().to_string(),