From 24576a15fce2f3922c83fc2a25c746481fa2bfbe Mon Sep 17 00:00:00 2001 From: taipanromania Date: Fri, 3 Oct 2008 08:31:53 +0000 Subject: [PATCH] warnings -- --- backend/postal.c | 14 +++++++------- backend/rss.c | 15 +++++++++------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/backend/postal.c b/backend/postal.c index d93821df..14dbafe0 100644 --- a/backend/postal.c +++ b/backend/postal.c @@ -239,10 +239,10 @@ char rm4scc(char source[], unsigned char dest[]) bottom = 0; /* start character */ - concat (dest, "1"); + concat ((char*)dest, "1"); for (i=0; i < strlen(source); i++) { - lookup(KRSET, RoyalTable, source[i], dest); + lookup(KRSET, RoyalTable, source[i], (char*)dest); strcpy(values, RoyalValues[posn(KRSET, source[i])]); top += ctoi(values[0]); bottom += ctoi(values[1]); @@ -254,10 +254,10 @@ char rm4scc(char source[], unsigned char dest[]) if(row == -1) { row = 5; } if(column == -1) { column = 5; } check_digit = (6 * row) + column; - concat(dest, RoyalTable[check_digit]); + concat((char*)dest, RoyalTable[check_digit]); /* stop character */ - concat (dest, "0"); + concat ((char*)dest, "0"); return set_copy[check_digit]; } @@ -283,7 +283,7 @@ int royal_plot(struct zint_symbol *symbol, unsigned char source[]) strcpy(symbol->errtxt, "error: invalid characters in data"); return error_number; } - check = rm4scc(source, height_pattern); + check = rm4scc((char*)source, (unsigned char*)height_pattern); writer = 0; for(loopey = 0; loopey < strlen(height_pattern); loopey++) @@ -378,12 +378,12 @@ int daft_code(struct zint_symbol *symbol, unsigned char source[]) strcpy(height_pattern, ""); input_length = ustrlen(source); - strcpy(local_source, source); + strcpy(local_source, (char*)source); if(input_length > 50) { strcpy(symbol->errtxt, "Input too long"); return ERROR_TOO_LONG; } - to_upper(local_source); + to_upper((unsigned char*)local_source); for (i = 0; i < input_length; i++) { if(local_source[i] == 'D') { concat(height_pattern, "2"); } diff --git a/backend/rss.c b/backend/rss.c index 0b662677..5fc8ea30 100644 --- a/backend/rss.c +++ b/backend/rss.c @@ -181,7 +181,7 @@ int rss14(struct zint_symbol *symbol, unsigned char source[]) data_group[i] = 0; } - binary_load(accum, source); + binary_load(accum, (char*)source); if(symbol->option_1 == 2) { /* Add symbol linkage flag */ @@ -669,7 +669,7 @@ int rsslimited(struct zint_symbol *symbol, unsigned char source[]) y_reg[i] = 0; } - binary_load(accum, source); + binary_load(accum, (char*)source); if(symbol->option_1 == 2) { /* Add symbol linkage flag */ binary_load(y_reg, "2015133531096"); @@ -1022,8 +1022,10 @@ int rss_binary_string(struct zint_symbol *symbol, unsigned char source[], char b char general_field[ustrlen(source)], general_field_type[ustrlen(source)]; int remainder, d1, d2, value; char padstring[14]; - - + + read_posn=0; + value=0; + /* Decide whether a compressed data field is required and if so what method to use - method 2 = no compressed data field */ @@ -1836,7 +1838,8 @@ int rssexpanded(struct zint_symbol *symbol, unsigned char source[]) int last_ai, ai_latch, separator_row; separator_row = 0; - + reader=0; + if(source[0] != '[') { strcpy(symbol->errtxt, "Data does not start with an AI"); return ERROR_INVALID_DATA; @@ -1911,7 +1914,7 @@ int rssexpanded(struct zint_symbol *symbol, unsigned char source[]) actually conform to the right data length - that is required of the person or program inputting the data */ - i = rss_binary_string(symbol, reduced, binary_string); + i = rss_binary_string(symbol, (unsigned char*)reduced, binary_string); if(i != 0) { return i; }