Fix warnings trivial warnings.

Fix warnings about:
 . Unused variables
 . format mismatch in printf/scanf format string and arguments
 . Missing parenthesis around assignment as truth values
 . Clang warnings anout unknown GCC pragma
This commit is contained in:
2012-12-11 18:42:21 +01:00
parent 77399bd649
commit 0ac803292e
65 changed files with 297 additions and 284 deletions

View File

@@ -259,7 +259,7 @@ again: if (fgets(buf, sizeof buf, in) == NULL) {
cpt--;
}
cpt = buf;
while (c = *cpt) {
while ((c = *cpt)) {
if (chtbl[c] != -1) {
format("uud: Duplicate char in translation table.\n");
Error(7);
@@ -300,7 +300,7 @@ void decode()
/*
* Get the binary line length.
*/
n = trtbl[*buf];
n = trtbl[(unsigned char)*buf];
if (n >= 0) goto decod;
/*
* end of uuencoded file ?
@@ -334,7 +334,7 @@ decod: rlen = cdlen[n];
*/
if (debug) {
for (len = 0, bp = buf; len < rlen; len++) {
if (trtbl[*bp] < 0) {
if (trtbl[(unsigned char)*bp] < 0) {
format(
"Non uuencoded char <%c>, line %d in file: %s\n", *bp, numl, ifname);
format("Bad line =%s\n",buf);
@@ -387,15 +387,15 @@ decod: rlen = cdlen[n];
len = n;
bp = &buf[1];
while (n > 0) {
*(ut++) = trtbl[*bp] << 2 | trtbl[bp[1]] >> 4;
*(ut++) = trtbl[(unsigned char)*bp] << 2 | trtbl[(unsigned char)bp[1]] >> 4;
n--;
if (n) {
*(ut++) = (trtbl[bp[1]] << 4) |
(trtbl[bp[2]] >> 2);
*(ut++) = (trtbl[(unsigned char)bp[1]] << 4) |
(trtbl[(unsigned char)bp[2]] >> 2);
n--;
}
if (n) {
*(ut++) = trtbl[bp[2]] << 6 | trtbl[bp[3]];
*(ut++) = trtbl[(unsigned char)bp[2]] << 6 | trtbl[(unsigned char)bp[3]];
n--;
}
bp += 4;