1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Fix faulty gcc warnings

This commit is contained in:
Werner Koch 2011-03-03 12:40:54 +01:00
parent 892793888e
commit ea41f5b4c1
5 changed files with 20 additions and 11 deletions

View file

@ -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>
* call-agent.c (agent_scd_pksign, agent_scd_pkdecrypt)

View file

@ -1182,21 +1182,20 @@ armor_filter( void *opaque, int control,
crc = afx->crc;
idx = afx->idx;
idx2 = afx->idx2;
for(i=0; i < idx; i++ )
radbuf[i] = afx->radbuf[i];
if( idx ) {
c = bintoasc[(*radbuf>>2)&077];
c = bintoasc[(afx->radbuf[0]>>2)&077];
iobuf_put(a, c);
if( idx == 1 ) {
c = bintoasc[((*radbuf << 4) & 060) & 077];
c = bintoasc[((afx->radbuf[0] << 4) & 060) & 077];
iobuf_put(a, c);
iobuf_put(a, '=');
iobuf_put(a, '=');
}
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);
c = bintoasc[((radbuf[1] << 2) & 074) & 077];
c = bintoasc[((afx->radbuf[1] << 2) & 074) & 077];
iobuf_put(a, c);
iobuf_put(a, '=');
}