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:
parent
e86fd65c81
commit
a80168a15b
@ -1141,7 +1141,7 @@ static CommandEntry *getCommandEntryAndCheckArgcAndPermission(int fd,
|
|||||||
static CommandEntry *getCommandEntryFromString(char *string, int *permission)
|
static CommandEntry *getCommandEntryFromString(char *string, int *permission)
|
||||||
{
|
{
|
||||||
CommandEntry *cmd = NULL;
|
CommandEntry *cmd = NULL;
|
||||||
char *argv[COMMAND_ARGV_MAX] = { 0 };
|
char *argv[COMMAND_ARGV_MAX] = { NULL };
|
||||||
int argc = cstrtok(string, argv, COMMAND_ARGV_MAX);
|
int argc = cstrtok(string, argv, COMMAND_ARGV_MAX);
|
||||||
|
|
||||||
if (0 == argc)
|
if (0 == argc)
|
||||||
@ -1157,7 +1157,7 @@ static int processCommandInternal(int fd, int *permission,
|
|||||||
char *commandString, struct strnode *cmdnode)
|
char *commandString, struct strnode *cmdnode)
|
||||||
{
|
{
|
||||||
int argc;
|
int argc;
|
||||||
char *argv[COMMAND_ARGV_MAX] = { 0 };
|
char *argv[COMMAND_ARGV_MAX] = { NULL };
|
||||||
CommandEntry *cmd;
|
CommandEntry *cmd;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ static ConfigParam *readConfigBlock(FILE * fp, int *count, char *string)
|
|||||||
int argsMinusComment;
|
int argsMinusComment;
|
||||||
|
|
||||||
while (myFgets(string, MAX_STRING_SIZE, fp)) {
|
while (myFgets(string, MAX_STRING_SIZE, fp)) {
|
||||||
char *array[CONF_LINE_TOKEN_MAX] = { 0 };
|
char *array[CONF_LINE_TOKEN_MAX] = { NULL };
|
||||||
|
|
||||||
(*count)++;
|
(*count)++;
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ void readConf(char *file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (myFgets(string, MAX_STRING_SIZE, fp)) {
|
while (myFgets(string, MAX_STRING_SIZE, fp)) {
|
||||||
char *array[CONF_LINE_TOKEN_MAX] = { 0 };
|
char *array[CONF_LINE_TOKEN_MAX] = { NULL };
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
numberOfArgs = cstrtok(string, array, CONF_LINE_TOKEN_MAX);
|
numberOfArgs = cstrtok(string, array, CONF_LINE_TOKEN_MAX);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
int normalizationEnabled;
|
int normalizationEnabled;
|
||||||
|
|
||||||
void initNormalization()
|
void initNormalization(void)
|
||||||
{
|
{
|
||||||
normalizationEnabled = getBoolConfigParam(CONF_VOLUME_NORMALIZATION);
|
normalizationEnabled = getBoolConfigParam(CONF_VOLUME_NORMALIZATION);
|
||||||
if (normalizationEnabled == -1) normalizationEnabled = 0;
|
if (normalizationEnabled == -1) normalizationEnabled = 0;
|
||||||
@ -34,7 +34,7 @@ void initNormalization()
|
|||||||
CompressCfg(0, ANTICLIP, TARGET, GAINMAX, GAINSMOOTH, BUCKETS);
|
CompressCfg(0, ANTICLIP, TARGET, GAINMAX, GAINSMOOTH, BUCKETS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void finishNormalization()
|
void finishNormalization(void)
|
||||||
{
|
{
|
||||||
if (normalizationEnabled) CompressFree();
|
if (normalizationEnabled) CompressFree();
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
#ifndef SLLIST_H
|
#ifndef SLLIST_H
|
||||||
#define SLLIST_H
|
#define SLLIST_H
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
/* just free the entire structure if it's free-able, the 'data' member
|
/* just free the entire structure if it's free-able, the 'data' member
|
||||||
* should _NEVER_ be explicitly freed
|
* should _NEVER_ be explicitly freed
|
||||||
*
|
*
|
||||||
|
@ -169,17 +169,17 @@ MpdTag *getID3Info(struct id3_tag *tag, char *id, int type, MpdTag * mpdTag)
|
|||||||
encoding = getConfigParamValue(CONF_ID3V1_ENCODING);
|
encoding = getConfigParamValue(CONF_ID3V1_ENCODING);
|
||||||
if (encoding) {
|
if (encoding) {
|
||||||
setCharSetConversion("ISO-8859-1", "UTF-8");
|
setCharSetConversion("ISO-8859-1", "UTF-8");
|
||||||
isostr = convStrDup(utf8);
|
isostr = convStrDup((char *)utf8);
|
||||||
free(utf8);
|
free(utf8);
|
||||||
setCharSetConversion("UTF-8", encoding);
|
setCharSetConversion("UTF-8", encoding);
|
||||||
utf8 = convStrDup(isostr);
|
utf8 = (id3_utf8_t *)convStrDup(isostr);
|
||||||
free(isostr);
|
free(isostr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mpdTag == NULL)
|
if (mpdTag == NULL)
|
||||||
mpdTag = newMpdTag();
|
mpdTag = newMpdTag();
|
||||||
addItemToMpdTag(mpdTag, type, utf8);
|
addItemToMpdTag(mpdTag, type, (char *)utf8);
|
||||||
|
|
||||||
free(utf8);
|
free(utf8);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user