pkgsrc-Bugs archive

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

pkg/43244: security/netpgp fails to build with gcc-4.5.0



>Number:         43244
>Category:       pkg
>Synopsis:       security/netpgp fails to build with gcc-4.5.0
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Mon May 03 23:20:01 +0000 2010
>Originator:     Juan RP
>Release:        NULL
>Organization:
>Environment:
>Description:
security/netpgp version 20100313 fails to build with gcc-4.5.0, due to this 
warning:

c1: warnings being treated as errors
verify.c: In function '__ops_pubkey_free':
verify.c:5553:2: error: case value '0' not in enumerated type 
'__ops_pubkey_alg_t'
make[2]: *** [netpgpverify-verify.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Looking at the code I've seen that verify.c is duplicating a lot of structs, 
enums, etc, that are defined in src/lib/packet.h already. In that case due to 
duplicated code the author forgot to add OPS_PKA_NOTHING in __ops_pubkey_alg_t.


>How-To-Repeat:

>Fix:
--- src/netpgpverify/verify.c.orig      2010-05-04 01:00:46.490355473 +0200
+++ src/netpgpverify/verify.c   2010-03-14 00:30:41.000000000 +0100
@@ -569,6 +569,7 @@ typedef struct __ops_ptag_t {
  * \see RFC4880 9.1
  */
 typedef enum {
+       OPS_PKA_NOTHING = 0,
        OPS_PKA_RSA = 1,        /* RSA (Encrypt or Sign) */
        OPS_PKA_RSA_ENCRYPT_ONLY = 2,   /* RSA Encrypt-Only (deprecated -
                                         * \see RFC4880 13.5) */
@@ -5551,7 +5550,7 @@ __ops_pubkey_free(__ops_pubkey_t *p)
                free_BN(&p->key.elgamal.y);
                break;
 
+       case OPS_PKA_NOTHING:
-       case 0:
                /* nothing to free */
                break;
 
--



Home | Main Index | Thread Index | Old Index