minor signed/unsigned cleanups

This commit is contained in:
Ron Pedde 2007-09-25 06:15:47 +00:00
parent 667d77a466
commit 208ef6b1f2
4 changed files with 11 additions and 10 deletions

View File

@ -389,7 +389,7 @@ static void fmturl(char *buffer, size_t *currlen, size_t maxlen,
char *safe = "abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"0123456789$-_.!*(),/@\\";
current=value;
current=(unsigned char *)value;
while(*current) {
if(strchr(safe,*current)) {
len++;
@ -399,13 +399,13 @@ static void fmturl(char *buffer, size_t *currlen, size_t maxlen,
current++;
}
new_string = (char*) malloc(len+1);
new_string = (unsigned char*) malloc(len+1);
if(!new_string) {
fmtstr(buffer,currlen,maxlen,value,flags,min,max);
return;
}
current = value;
current = (unsigned char *)value;
dest = new_string;
while(*current) {
if(strchr(safe,*current)) {
@ -423,7 +423,7 @@ static void fmturl(char *buffer, size_t *currlen, size_t maxlen,
}
}
*dest = '\0';
fmtstr(buffer,currlen,maxlen,new_string,flags,min,max);
fmtstr(buffer,currlen,maxlen,(char*)new_string,flags,min,max);
free(new_string);
return;
}

View File

@ -164,7 +164,7 @@ static TAGHANDLER taghandlers[] = {
{ "mpp", scan_get_mpcinfo, "mpc", "mpc", 0, "Musepack audio file" },
{ "mp+", scan_get_mpcinfo, "mpc", "mpc", 0, "Musepack audio file" },
#endif
{ NULL, NULL, NULL, NULL, NULL }
{ NULL, NULL, NULL, NULL, 0, NULL }
};
typedef struct tag_playlistlist {

View File

@ -362,9 +362,10 @@ int scan_mp3_get_mp3tags(char *file, MP3FILE *pmp3) {
#ifdef HAVE_ICONV
/* this is kinda cheesy, but ucs4* == char* for 8859-1 */
free(utf8_text);
utf8_text = util_xtoutf8_alloc((unsigned char*)native_text,
strlen((char*)native_text),
conversion_codepage);
utf8_text =
(char*)util_xtoutf8_alloc((unsigned char*)native_text,
strlen((char*)native_text),
conversion_codepage);
#endif
}

View File

@ -147,8 +147,8 @@ int util_xtoy(unsigned char *dbuffer, int dlen, unsigned char *sbuffer, int slen
/* type punning warnings */
size_t st_dlen = (size_t)dlen;
size_t st_slen = (size_t)slen;
char *st_dbuffer = dbuffer;
ICONV_CONST char *st_sbuffer = sbuffer;
char *st_dbuffer = (char*)dbuffer;
ICONV_CONST char *st_sbuffer = (char*)sbuffer;
memset(dbuffer,0,dlen);