We are already compiling libvirt with -Wvla - so it does not make
too much sense to still allow people to use alloca() instead. Thus
put it on the list of things we want to warn about. Fortunately,
there is currently no warning with this flag, so the current
sources should be clean.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/meson.build b/meson.build
index 40c841e777..a97efdf8f4 100644
--- a/meson.build
+++ b/meson.build
@@ -234,6 +234,7 @@ cc_flags += [
'-Waddress-of-packed-member',
'-Waggressive-loop-optimizations',
'-Walloc-size-larger-than=@0@'.format(alloc_max.stdout().strip()),
+ '-Walloca',
'-Warray-bounds=2',
'-Wattribute-alias=2',
'-Wattribute-warning',
--
2.27.0
On a Thursday in 2021, Thomas Huth wrote: >We are already compiling libvirt with -Wvla - so it does not make >too much sense to still allow people to use alloca() instead. Thus >put it on the list of things we want to warn about. Fortunately, >there is currently no warning with this flag, so the current >sources should be clean. > >Signed-off-by: Thomas Huth <thuth@redhat.com> >--- > meson.build | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Ján Tomko <jtomko@redhat.com> A pipeline with this and your other warning patch: https://gitlab.com/janotomko/libvirt/-/pipelines/310576595 (I'll push it after the release) Jano
On 5/27/21 1:30 PM, Ján Tomko wrote: > On a Thursday in 2021, Thomas Huth wrote: >> We are already compiling libvirt with -Wvla - so it does not make >> too much sense to still allow people to use alloca() instead. Thus >> put it on the list of things we want to warn about. Fortunately, >> there is currently no warning with this flag, so the current >> sources should be clean. >> >> Signed-off-by: Thomas Huth <thuth@redhat.com> >> --- >> meson.build | 1 + >> 1 file changed, 1 insertion(+) >> > > Reviewed-by: Ján Tomko <jtomko@redhat.com> > > A pipeline with this and your other warning patch: > https://gitlab.com/janotomko/libvirt/-/pipelines/310576595 > > (I'll push it after the release) > Now pushed. (which is technically after the release, as I promised :) Jano > Jano
© 2016 - 2024 Red Hat, Inc.