gcc signedness and sparse fixes

git-svn-id: https://svn.musicpd.org/mpd/trunk@4489 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong 2006-07-30 08:56:55 +00:00
parent e86fd65c81
commit a80168a15b
5 changed files with 11 additions and 9 deletions

View File

@ -1141,7 +1141,7 @@ static CommandEntry *getCommandEntryAndCheckArgcAndPermission(int fd,
static CommandEntry *getCommandEntryFromString(char *string, int *permission)
{
CommandEntry *cmd = NULL;
char *argv[COMMAND_ARGV_MAX] = { 0 };
char *argv[COMMAND_ARGV_MAX] = { NULL };
int argc = cstrtok(string, argv, COMMAND_ARGV_MAX);
if (0 == argc)
@ -1157,7 +1157,7 @@ static int processCommandInternal(int fd, int *permission,
char *commandString, struct strnode *cmdnode)
{
int argc;
char *argv[COMMAND_ARGV_MAX] = { 0 };
char *argv[COMMAND_ARGV_MAX] = { NULL };
CommandEntry *cmd;
int ret = -1;

View File

@ -199,7 +199,7 @@ static ConfigParam *readConfigBlock(FILE * fp, int *count, char *string)
int argsMinusComment;
while (myFgets(string, MAX_STRING_SIZE, fp)) {
char *array[CONF_LINE_TOKEN_MAX] = { 0 };
char *array[CONF_LINE_TOKEN_MAX] = { NULL };
(*count)++;
@ -262,7 +262,7 @@ void readConf(char *file)
}
while (myFgets(string, MAX_STRING_SIZE, fp)) {
char *array[CONF_LINE_TOKEN_MAX] = { 0 };
char *array[CONF_LINE_TOKEN_MAX] = { NULL };
count++;
numberOfArgs = cstrtok(string, array, CONF_LINE_TOKEN_MAX);

View File

@ -24,7 +24,7 @@
int normalizationEnabled;
void initNormalization()
void initNormalization(void)
{
normalizationEnabled = getBoolConfigParam(CONF_VOLUME_NORMALIZATION);
if (normalizationEnabled == -1) normalizationEnabled = 0;
@ -34,7 +34,7 @@ void initNormalization()
CompressCfg(0, ANTICLIP, TARGET, GAINMAX, GAINSMOOTH, BUCKETS);
}
void finishNormalization()
void finishNormalization(void)
{
if (normalizationEnabled) CompressFree();
}

View File

@ -3,6 +3,8 @@
#ifndef SLLIST_H
#define SLLIST_H
#include <stddef.h>
/* just free the entire structure if it's free-able, the 'data' member
* should _NEVER_ be explicitly freed
*

View File

@ -169,17 +169,17 @@ MpdTag *getID3Info(struct id3_tag *tag, char *id, int type, MpdTag * mpdTag)
encoding = getConfigParamValue(CONF_ID3V1_ENCODING);
if (encoding) {
setCharSetConversion("ISO-8859-1", "UTF-8");
isostr = convStrDup(utf8);
isostr = convStrDup((char *)utf8);
free(utf8);
setCharSetConversion("UTF-8", encoding);
utf8 = convStrDup(isostr);
utf8 = (id3_utf8_t *)convStrDup(isostr);
free(isostr);
}
}
if (mpdTag == NULL)
mpdTag = newMpdTag();
addItemToMpdTag(mpdTag, type, utf8);
addItemToMpdTag(mpdTag, type, (char *)utf8);
free(utf8);
}