pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pamtester: Avoid harmful -Werror



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Mon Oct 12 21:33:01 2026 +0200
Changeset:	546157171ba37f043fae06c34cb64997d1c89288

Modified Files:
	pamtester/Makefile
Removed Files:
	pamtester/TODO

Log Message:
pamtester: Avoid harmful -Werror

Using -Werror is usually not okay in pkgsrc and too much out of control.

In particular, the PAM_CONV_CONST test that checks if the second
argument of pam_conv.conv() takes const pointer failed on NetBSD
because in the test the variable "c" was not used.

Now the package install cleanly on NetBSD.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=546157171ba37f043fae06c34cb64997d1c89288

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 pamtester/Makefile |  2 ++
 pamtester/TODO     | 19 -------------------
 2 files changed, 2 insertions(+), 19 deletions(-)

diffs:
diff --git a/pamtester/Makefile b/pamtester/Makefile
index c5708435e7..537e970db4 100644
--- a/pamtester/Makefile
+++ b/pamtester/Makefile
@@ -12,5 +12,7 @@ LICENSE=	modified-bsd
 GNU_CONFIGURE=	yes
 USE_LIBTOOL=	yes
 
+BUILDLINK_TRANSFORM+=	rm:-Werror
+
 .include "../../mk/bsd.pkg.mk"
 .include "../../mk/pam.buildlink3.mk"
diff --git a/pamtester/TODO b/pamtester/TODO
deleted file mode 100644
index a068f73f8b..0000000000
--- a/pamtester/TODO
+++ /dev/null
@@ -1,19 +0,0 @@
-On NetBSD build fails with:
-
---- app.o ---
-gcc -DHAVE_CONFIG_H -I. -I. -I..     -Wall -c app.c
-In file included from app.c:83:
-app.c: In function 'pamtester_app_run':
-compat.h:56:19: error: initialization of 'int (*)(int,  const struct pam_message **, struct pam_response **, void *)' from incompatible pointer type 'int (*)(int,  struct pam_message **, struct pam_response **, void *)' [-Wincompatible-pointer-types]
-   56 | #define misc_conv pamtester_compat_misc_conv
-      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
-app.c:204:40: note: in expansion of macro 'misc_conv'
-  204 |         const struct pam_conv conv = { misc_conv, NULL };
-      |                                        ^~~~~~~~~
-compat.h:56:19: note: (near initialization for 'conv.conv')
-   56 | #define misc_conv pamtester_compat_misc_conv
-      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
-app.c:204:40: note: in expansion of macro 'misc_conv'
-  204 |         const struct pam_conv conv = { misc_conv, NULL };
-      |                                        ^~~~~~~~~
-*** [app.o] Error code 1


Home | Main Index | Thread Index | Old Index