Message ID | 20220125141422.32655-8-cgzones@googlemail.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Paul Moore |
Headers | show |
Series | [1/9] selinux: check return value of sel_make_avc_files | expand |
On Tue, Jan 25, 2022 at 6:15 AM Christian Göttsche <cgzones@googlemail.com> wrote: > > The macro _DEBUG_HASHES is nowhere used. The configuration DEBUG_HASHES > enables debugging of the SELinux hash tables, but the with an underscore > prefixed macro definition has no direct impact or any documentation. > > Reported by clang [-Wunused-macros] > > Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> > --- > security/selinux/ss/policydb.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c > index 67e03f6e8966..d036e1238e77 100644 > --- a/security/selinux/ss/policydb.c > +++ b/security/selinux/ss/policydb.c > @@ -41,8 +41,6 @@ > #include "mls.h" > #include "services.h" > > -#define _DEBUG_HASHES > - > #ifdef DEBUG_HASHES > static const char *symtab_name[SYM_NUM] = { > "common prefixes", > -- > 2.34.1 >
On Tue, Jan 25, 2022 at 9:15 AM Christian Göttsche <cgzones@googlemail.com> wrote: > > The macro _DEBUG_HASHES is nowhere used. The configuration DEBUG_HASHES > enables debugging of the SELinux hash tables, but the with an underscore > prefixed macro definition has no direct impact or any documentation. > > Reported by clang [-Wunused-macros] > > Signed-off-by: Christian Göttsche <cgzones@googlemail.com> > --- > security/selinux/ss/policydb.c | 2 -- > 1 file changed, 2 deletions(-) Merged into selinux/next, thanks Christian. This macro definition predates the move to git so there is no quick answer to "why is this here?", but my best guess is that it is an artifact of a developer "disabling" the DEBUG_HASHES macro by adding an underscore to the front. Regardless of the reason behind it, I agree it should be removed.
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 67e03f6e8966..d036e1238e77 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -41,8 +41,6 @@ #include "mls.h" #include "services.h" -#define _DEBUG_HASHES - #ifdef DEBUG_HASHES static const char *symtab_name[SYM_NUM] = { "common prefixes",
The macro _DEBUG_HASHES is nowhere used. The configuration DEBUG_HASHES enables debugging of the SELinux hash tables, but the with an underscore prefixed macro definition has no direct impact or any documentation. Reported by clang [-Wunused-macros] Signed-off-by: Christian Göttsche <cgzones@googlemail.com> --- security/selinux/ss/policydb.c | 2 -- 1 file changed, 2 deletions(-)