warnings --

This commit is contained in:
taipanromania 2008-10-03 09:49:03 +00:00
parent b1b43da367
commit fc6a432f7b

View File

@ -250,8 +250,9 @@ char ecc200encode(unsigned char *t, int tl, unsigned char *s, int sl,
case 't': // Text case 't': // Text
case 'x': // X12 case 'x': // X12
{ {
char out[6], p = 0; char out[6];
const char *e, int p = 0;
const char *e=0,
*s2 = "!\"#$%&'()*+,-./:;<=>?@[\\]_", *s2 = "!\"#$%&'()*+,-./:;<=>?@[\\]_",
*s3 = 0; *s3 = 0;
if (newenc == 'c') { if (newenc == 'c') {
@ -264,6 +265,8 @@ char ecc200encode(unsigned char *t, int tl, unsigned char *s, int sl,
} }
if (newenc == 'x') if (newenc == 'x')
e = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\r*>"; e = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\r*>";
if (!e)
break;
do { do {
unsigned char c = s[sp++]; unsigned char c = s[sp++];
char *w; char *w;
@ -493,7 +496,7 @@ static char *encmake(int l, unsigned char *s, int *lenp, char exact)
{ {
char *encoding = 0; char *encoding = 0;
int p = l; int p = l;
char e; int e;
struct { struct {
// number of bytes of source that can be encoded in a row at this point // number of bytes of source that can be encoded in a row at this point
// using this encoding mode // using this encoding mode
@ -508,8 +511,8 @@ static char *encmake(int l, unsigned char *s, int *lenp, char exact)
if (l > MAXBARCODE) if (l > MAXBARCODE)
return 0; // not valid return 0; // not valid
while (p--) { while (p--) {
char b = 0, sub; char sub;
int sl, tl, bl, t; int b = 0, sl, tl, bl, t;
// consider each encoding from this point // consider each encoding from this point
// ASCII // ASCII
sl = tl = 1; sl = tl = 1;
@ -790,10 +793,9 @@ static char *encmake(int l, unsigned char *s, int *lenp, char exact)
encoding = safemalloc(l + 1); encoding = safemalloc(l + 1);
p = 0; p = 0;
{ {
char cur = E_ASCII; // starts ASCII int cur = E_ASCII; // starts ASCII
while (p < l) { while (p < l) {
int t, m = 0; int t, m = 0, b = 0;
char b = 0;
for (e = 0; e < E_MAX; e++) for (e = 0; e < E_MAX; e++)
if (enc[p][e].t if (enc[p][e].t
&& ((t = enc[p][e].t + switchcost[cur][e]) < && ((t = enc[p][e].t + switchcost[cur][e]) <