1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-09-21 15:01:41 +02:00

gpg: Silence a compiler warning.

* g10/parse-packet.c (enum_sig_subpkt): Replace hack.

--

GCC 5 failure reported by Kevin Locke <kevin@kevinlocke.name>

(backport from master commit 6a0c3fa19c)
This commit is contained in:
Werner Koch 2014-09-18 15:08:51 +02:00 committed by NIIBE Yutaka
parent 9232df23ac
commit 6db18e29eb

View File

@ -1183,10 +1183,10 @@ enum_sig_subpkt( const subpktarea_t *pktbuf, sigsubpkttype_t reqtype,
critical=&critical_dummy; critical=&critical_dummy;
if( !pktbuf || reqseq == -1 ) { if( !pktbuf || reqseq == -1 ) {
/* return some value different from NULL to indicate that static char dummy[] = "x";
* there is no critical bit we do not understand. The caller /* Return a value different from NULL to indicate that
* will never use the value. Yes I know, it is an ugly hack */ * there is no critical bit we do not understand. */
return reqtype == SIGSUBPKT_TEST_CRITICAL? (const byte*)&pktbuf : NULL; return reqtype == SIGSUBPKT_TEST_CRITICAL ? dummy : NULL;
} }
buffer = pktbuf->data; buffer = pktbuf->data;
buflen = pktbuf->len; buflen = pktbuf->len;