On Fri, Dec 06, 2019 at 05:07:24PM +0100, Tomas Mraz wrote:
The attached patch fixes all warnings encountered in build with -Wall
-Wextra options with gcc-9.2.1.
I had to suppress two warnings for bison/flex generated code.
OK to commit?
[...]
--- a/libpamc/include/security/pam_client.h
+++ b/libpamc/include/security/pam_client.h
@@ -109,7 +109,7 @@ char **pamc_list_agents(pamc_handle_t pch);
#define PAM_BP_RENEW(old_p, cntrl, data_length) \
do { \
- if (old_p) { \
+ if (old_p != NULL) { \
if (*(old_p)) { \
u_int32_t __size; \
__size = PAM_BP_SIZE(*(old_p)); \
I wonder why this hunk suppresses any warnings.
If it really helps, then it has to be (old_p).
The rest of the change looks OK, although I haven't checked whether it
suppresses *all* warnings.
--
ldv