More warnings zapped into submission!

This commit is contained in:
hooper114 2008-10-06 18:50:36 +00:00
parent bd9765bfd1
commit 05d77b5fa3

View File

@ -239,8 +239,7 @@ char ecc200encode(unsigned char *t, int tl, unsigned char *s, int sl, char *enco
// do the encoding // do the encoding
while (sp < sl && tp < tl) { while (sp < sl && tp < tl) {
char newenc = enc; // suggest new encoding char newenc = enc; // suggest new encoding
if (tl - tp <= 1 && (enc == 'c' || enc == 't') || tl - tp <= 2 if ((tl - tp <= 1 && (enc == 'c' || enc == 't')) || (tl - tp <= 2 && enc == 'x'))
&& enc == 'x')
enc = 'a'; // auto revert to ASCII enc = 'a'; // auto revert to ASCII
newenc = tolower(encoding[sp]); newenc = tolower(encoding[sp]);
switch (newenc) { // encode character switch (newenc) { // encode character
@ -710,7 +709,7 @@ static char *encmake(int l, unsigned char *s, int *lenp, char exact)
while (p < l) { while (p < l) {
int t, m = 0, b = 0; int t, m = 0, b = 0;
for (e = 0; e < E_MAX; e++) for (e = 0; e < E_MAX; e++)
if (enc[p][(int)e].t && ((t = enc[p][(int)e].t + switchcost[(int)cur][(int)e]) < m || t == m && e == cur || !m)) { if (enc[p][(int)e].t && (((t = enc[p][(int)e].t + switchcost[(int)cur][(int)e]) < m) || ((t == m && e == cur) || !m))) {
b = e; b = e;
m = t; m = t;
} }
@ -837,7 +836,7 @@ unsigned char *iec16022ecc200(int *Wptr, int *Hptr, char **encodingptr, int barc
for (x = 0; x < NC; x++) { for (x = 0; x < NC; x++) {
int v = places[(NR - y - 1) * NC + x]; int v = places[(NR - y - 1) * NC + x];
//fprintf (stderr, "%4d", v); //fprintf (stderr, "%4d", v);
if (v == 1 || v > 7 && (binary[(v >> 3) - 1] & (1 << (v & 7)))) if (v == 1 || (v > 7 && (binary[(v >> 3) - 1] & (1 << (v & 7)))))
grid[(1 + y + 2 * (y / (matrix->FH - 2))) * W + 1 + x + 2 * (x / (matrix->FW - 2))] = 1; grid[(1 + y + 2 * (y / (matrix->FH - 2))) * W + 1 + x + 2 * (x / (matrix->FW - 2))] = 1;
} }
//fprintf (stderr, "\n"); //fprintf (stderr, "\n");