aboutsummaryrefslogtreecommitdiff
path: root/libpam/include
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2023-11-11 14:30:41 +0100
committerBenny Baumann <BenBE@geshi.org>2023-11-14 00:27:49 +0100
commitea5722f7304489cd8235a0ade7ce8fc6a62103eb (patch)
treeb4351ecc930d3ef0b1fe11f2f60392771473f027 /libpam/include
parenta3cef68e9967e2c0257605f2130dd0a53951ab96 (diff)
downloadpam-ea5722f7304489cd8235a0ade7ce8fc6a62103eb.tar.gz
pam-ea5722f7304489cd8235a0ade7ce8fc6a62103eb.tar.bz2
pam-ea5722f7304489cd8235a0ade7ce8fc6a62103eb.zip
libpam: mark debug output functions as potentially unused
Marking the functions _pam_output_debug and _pam_output_debug_info as potentially unused reduces the noise when compiling in debug mode. The warning is produced whenever _pam_macros.h is included, but no debug output is produced by the module. Just marking the function as static inline, which would have a similar effect, does not work for various reasons and instead produces new issues instead. Thus silencing this warning by telling the compiler about our intentions with these functions is the better approach. Signed-off-by: Benny Baumann <BenBE@geshi.org>
Diffstat (limited to 'libpam/include')
-rw-r--r--libpam/include/security/_pam_macros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpam/include/security/_pam_macros.h b/libpam/include/security/_pam_macros.h
index b6a5c2e4..8044e451 100644
--- a/libpam/include/security/_pam_macros.h
+++ b/libpam/include/security/_pam_macros.h
@@ -97,6 +97,9 @@ do { \
#define _PAM_LOGFILE "/var/run/pam-debug.log"
#endif
+#ifdef UNUSED
+UNUSED
+#endif
static void _pam_output_debug_info(const char *file, const char *fn
, const int line)
{
@@ -123,6 +126,9 @@ static void _pam_output_debug_info(const char *file, const char *fn
fclose(logfile);
}
+#ifdef UNUSED
+UNUSED
+#endif
PAM_FORMAT((printf, 1, 2))
static void _pam_output_debug(const char *format, ...)
{