From: Philipp Stephani Date: Thu, 22 Apr 2021 14:11:10 +0000 (+0200) Subject: Ensure that argument to 'verify' is a constant expression. X-Git-Tag: emacs-28.0.90~2777 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aaf6b6bf80805d18180e1c16350e9473716f5915;p=emacs.git Ensure that argument to 'verify' is a constant expression. Casting NULL is not a constant expression (Bug#47951). * lib-src/seccomp-filter.c (main): Turn check for null pointer representation into a runtime assertion. --- diff --git a/lib-src/seccomp-filter.c b/lib-src/seccomp-filter.c index 31d0809f8f0..dc568e035b5 100644 --- a/lib-src/seccomp-filter.c +++ b/lib-src/seccomp-filter.c @@ -35,6 +35,7 @@ variants of those files that can be used to sandbox Emacs before #include "config.h" +#include #include #include #include @@ -169,7 +170,7 @@ main (int argc, char **argv) verify (sizeof (long) == 8 && LONG_MIN == INT64_MIN && LONG_MAX == INT64_MAX); verify (sizeof (void *) == 8); - verify ((uintptr_t) NULL == 0); + assert ((uintptr_t) NULL == 0); /* Allow a clean exit. */ RULE (SCMP_ACT_ALLOW, SCMP_SYS (exit));