Mercurial > pidgin
diff src/protocols/oscar/im.c @ 12429:59207955adc2
[gaim-migrate @ 14736]
There are quite a few cases of empty if blocks for various aim_tlv_gettlv() calls. These calls exist in the code as documentation of various TLVs seen in the wild, but unhandled in Gaim for whatever reason. I'm changing them so the compiler is happy. This way, we can get quite a few useful warnings by turning on -Wextra.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Fri, 09 Dec 2005 04:05:04 +0000 |
| parents | 48244c196228 |
| children | e856f985a0b9 |
line wrap: on
line diff
--- a/src/protocols/oscar/im.c Fri Dec 09 03:42:47 2005 +0000 +++ b/src/protocols/oscar/im.c Fri Dec 09 04:05:04 2005 +0000 @@ -1436,12 +1436,20 @@ args->charsubset = sec->charsubset; /* Set up the simple flags */ - if (args->charsubset == 0x0000) - ; /* standard subencoding? */ - else if (args->charsubset == 0x000b) - args->icbmflags |= AIM_IMFLAGS_SUBENC_MACINTOSH; - else if (args->charsubset == 0xffff) - ; /* no subencoding */ + switch (args->charsubset) + { + case 0x0000: + /* standard subencoding? */ + break; + case 0x000b: + args->icbmflags |= AIM_IMFLAGS_SUBENC_MACINTOSH; + break; + case 0xffff: + /* no subencoding */ + break; + default: + break; + } args->msg = sec->data; args->msglen = sec->datalen; @@ -1934,6 +1942,7 @@ if (aim_tlv_gettlv(list2, 0x000e, 1)) args.language = aim_tlv_getstr(list2, 0x000e, 1); +#if 0 /* * Unknown -- no value * @@ -1942,8 +1951,10 @@ */ /* I don't think this indicates a direct transfer; this flag is * also present in a stage 1 proxied file send request -- Jonathan */ - if (aim_tlv_gettlv(list2, 0x000f, 1)) - ; + if (aim_tlv_gettlv(list2, 0x000f, 1)) { + /* Unhandled */ + } +#endif /* * Flag meaning we should proxy the file transfer through an AIM server
