mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Fix faulty gcc warnings
This commit is contained in:
parent
892793888e
commit
ea41f5b4c1
@ -1,3 +1,8 @@
|
|||||||
|
2011-03-03 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* armor.c (armor_filter): Don't take a copy of radbuf while
|
||||||
|
writing the checksum. This works around a faulty gcc 4.4 warning.
|
||||||
|
|
||||||
2011-03-02 Werner Koch <wk@g10code.com>
|
2011-03-02 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* call-agent.c (agent_scd_pksign, agent_scd_pkdecrypt)
|
* call-agent.c (agent_scd_pksign, agent_scd_pkdecrypt)
|
||||||
|
11
g10/armor.c
11
g10/armor.c
@ -1182,21 +1182,20 @@ armor_filter( void *opaque, int control,
|
|||||||
crc = afx->crc;
|
crc = afx->crc;
|
||||||
idx = afx->idx;
|
idx = afx->idx;
|
||||||
idx2 = afx->idx2;
|
idx2 = afx->idx2;
|
||||||
for(i=0; i < idx; i++ )
|
|
||||||
radbuf[i] = afx->radbuf[i];
|
|
||||||
if( idx ) {
|
if( idx ) {
|
||||||
c = bintoasc[(*radbuf>>2)&077];
|
c = bintoasc[(afx->radbuf[0]>>2)&077];
|
||||||
iobuf_put(a, c);
|
iobuf_put(a, c);
|
||||||
if( idx == 1 ) {
|
if( idx == 1 ) {
|
||||||
c = bintoasc[((*radbuf << 4) & 060) & 077];
|
c = bintoasc[((afx->radbuf[0] << 4) & 060) & 077];
|
||||||
iobuf_put(a, c);
|
iobuf_put(a, c);
|
||||||
iobuf_put(a, '=');
|
iobuf_put(a, '=');
|
||||||
iobuf_put(a, '=');
|
iobuf_put(a, '=');
|
||||||
}
|
}
|
||||||
else { /* 2 */
|
else { /* 2 */
|
||||||
c = bintoasc[(((*radbuf<<4)&060)|((radbuf[1]>>4)&017))&077];
|
c = bintoasc[(((afx->radbuf[0]<<4)&060)
|
||||||
|
|((afx->radbuf[1]>>4)&017))&077];
|
||||||
iobuf_put(a, c);
|
iobuf_put(a, c);
|
||||||
c = bintoasc[((radbuf[1] << 2) & 074) & 077];
|
c = bintoasc[((afx->radbuf[1] << 2) & 074) & 077];
|
||||||
iobuf_put(a, c);
|
iobuf_put(a, c);
|
||||||
iobuf_put(a, '=');
|
iobuf_put(a, '=');
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2011-03-03 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* base64.c (base64_finish_write): Do not copy to radbuf to get rid
|
||||||
|
of a faulty gcc 4.4 "used uninitialized" warning.
|
||||||
|
|
||||||
2011-03-01 Werner Koch <wk@g10code.com>
|
2011-03-01 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* certreqgen.c (pSERIAL, pISSUERDN, pNOTBEFORE, pNOTAFTER)
|
* certreqgen.c (pSERIAL, pISSUERDN, pNOTBEFORE, pNOTAFTER)
|
||||||
|
@ -484,8 +484,8 @@ plain_writer_cb (void *cb_value, const void *buffer, size_t count)
|
|||||||
static int
|
static int
|
||||||
base64_finish_write (struct writer_cb_parm_s *parm)
|
base64_finish_write (struct writer_cb_parm_s *parm)
|
||||||
{
|
{
|
||||||
unsigned char radbuf[4];
|
unsigned char *radbuf;
|
||||||
int i, c, idx, quad_count;
|
int c, idx, quad_count;
|
||||||
estream_t stream = parm->stream;
|
estream_t stream = parm->stream;
|
||||||
|
|
||||||
if (!parm->wrote_begin)
|
if (!parm->wrote_begin)
|
||||||
@ -494,11 +494,10 @@ base64_finish_write (struct writer_cb_parm_s *parm)
|
|||||||
/* flush the base64 encoding */
|
/* flush the base64 encoding */
|
||||||
idx = parm->base64.idx;
|
idx = parm->base64.idx;
|
||||||
quad_count = parm->base64.quad_count;
|
quad_count = parm->base64.quad_count;
|
||||||
for (i=0; i < idx; i++)
|
|
||||||
radbuf[i] = parm->base64.radbuf[i];
|
|
||||||
|
|
||||||
if (idx)
|
if (idx)
|
||||||
{
|
{
|
||||||
|
radbuf = parm->base64.radbuf;
|
||||||
|
|
||||||
c = bintoasc[(*radbuf>>2)&077];
|
c = bintoasc[(*radbuf>>2)&077];
|
||||||
es_putc (c, stream);
|
es_putc (c, stream);
|
||||||
if (idx == 1)
|
if (idx == 1)
|
||||||
|
@ -157,5 +157,6 @@ gcry_create_nonce (void *buffer, size_t length)
|
|||||||
const char *
|
const char *
|
||||||
gcry_cipher_algo_name (int algo)
|
gcry_cipher_algo_name (int algo)
|
||||||
{
|
{
|
||||||
|
(void)algo;
|
||||||
return "?";
|
return "?";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user