Fix miscellaneous warnings, reformat one if...else for readibility.
svn path=/trunk/; revision=3956
}
if (*u == ' ') { *t++ = '_'; continue; }
if (strchr(encchars, *u)) { *t++ = *u; continue; }
}
if (*u == ' ') { *t++ = '_'; continue; }
if (strchr(encchars, *u)) { *t++ = *u; continue; }
- sprintf(t, "=%02X", (unsigned char)*u);
+ sprintf(t, "=%02X", (unsigned int)((unsigned char)*u));
l = strcspn(r, ws);
words[idx] = xmalloc(l+1);
memcpy(words[idx], r, l);
l = strcspn(r, ws);
words[idx] = xmalloc(l+1);
memcpy(words[idx], r, l);
idx++;
r += l;
if (!*r) break;
l = strspn(r, ws);
words[idx] = xmalloc(l+1);
memcpy(words[idx], r, l);
idx++;
r += l;
if (!*r) break;
l = strspn(r, ws);
words[idx] = xmalloc(l+1);
memcpy(words[idx], r, l);
free(words[idx]);
words[idx] = tmp;
for (i = idx + 1; i <= end; i++)
free(words[idx]);
words[idx] = tmp;
for (i = idx + 1; i <= end; i++)
- for (idx = l = 0; idx < count; idx++) {
+ l = 0;
+ for (idx = 0; idx < count; idx++) {
l += strlen(words[idx]);
}
l += strlen(words[idx]);
}
t = stpcpy(t, words[i+1]);
}
tmp = strrchr(out, '\n');
t = stpcpy(t, words[i+1]);
}
tmp = strrchr(out, '\n');
- if (!tmp) tmp = out; else tmp++;
+ if (tmp == NULL)
+ tmp = out;
+ else
+ tmp++;