diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/libezxml/ezxml.c | 4 | ||||
-rw-r--r-- | src/libpiano/crypt.c | 8 | ||||
-rw-r--r-- | src/ui.c | 8 |
4 files changed, 11 insertions, 11 deletions
@@ -130,7 +130,7 @@ clean: all: pianobar debug: pianobar -debug: CFLAGS=-pedantic -ggdb -Wall -Wmissing-declarations -Wshadow +debug: CFLAGS=-pedantic -ggdb -Wall -Wmissing-declarations -Wshadow -Wcast-qual waitress-test: CFLAGS+= -DTEST waitress-test: ${LIBWAITRESS_OBJ} diff --git a/src/libezxml/ezxml.c b/src/libezxml/ezxml.c index ced87ea..0e1dd5d 100644 --- a/src/libezxml/ezxml.c +++ b/src/libezxml/ezxml.c @@ -108,7 +108,7 @@ static ezxml_t ezxml_insert(ezxml_t xml, ezxml_t dest, size_t off) // Adds a child tag. off is the offset of the child tag relative to the start // of the parent tag's character content. Returns the child tag. -static ezxml_t ezxml_add_child(ezxml_t xml, const char *name, size_t off) +static ezxml_t ezxml_add_child(ezxml_t xml, char *name, size_t off) { ezxml_t child; @@ -131,7 +131,7 @@ ezxml_t ezxml_child(ezxml_t xml, const char *name) } // returns a new empty ezxml structure with the given root tag name -static ezxml_t ezxml_new(const char *name) +static ezxml_t ezxml_new(char *name) { static char *ent[] = { "lt;", "<", "gt;", ">", "quot;", """, "apos;", "'", "amp;", "&", NULL }; diff --git a/src/libpiano/crypt.c b/src/libpiano/crypt.c index 9c96629..e833868 100644 --- a/src/libpiano/crypt.c +++ b/src/libpiano/crypt.c @@ -48,7 +48,7 @@ THE SOFTWARE. #define INITIAL_SHIFT 28 #define SHIFT_DEC 4 char *PianoDecryptString (const char * const s) { - const unsigned char *strInput = (unsigned char *) s; + const unsigned char *strInput = (const unsigned char *) s; /* hex-decode => strlen/2 + null-byte */ uint32_t *iDecrypt; char *strDecrypted; @@ -56,7 +56,7 @@ char *PianoDecryptString (const char * const s) { /* blowfish blocks, 32-bit */ uint32_t f, l, r, lrExchange; - if ((iDecrypt = calloc (strlen ((char *) strInput)/2/sizeof (*iDecrypt)+1, + if ((iDecrypt = calloc (strlen ((const char *) strInput)/2/sizeof (*iDecrypt)+1, sizeof (*iDecrypt))) == NULL) { return NULL; } @@ -122,8 +122,8 @@ char *PianoDecryptString (const char * const s) { * @return encrypted, hex-encoded string */ char *PianoEncryptString (const char *s) { - const unsigned char *strInput = (unsigned char *) s; - const size_t strInputN = strlen ((char *) strInput); + const unsigned char *strInput = (const unsigned char *) s; + const size_t strInputN = strlen ((const char *) strInput); /* num of 64-bit blocks, rounded to next block */ size_t blockN = strInputN / 8 + 1; uint32_t *blockInput, *blockPtr; @@ -235,16 +235,16 @@ int BarUiPianoCall (BarApp_t * const app, PianoRequestType_t type, /* Station sorting functions */ static inline int BarStationQuickmix01Cmp (const void *a, const void *b) { - const PianoStation_t *stationA = *((PianoStation_t **) a), - *stationB = *((PianoStation_t **) b); + const PianoStation_t *stationA = *((PianoStation_t * const *) a), + *stationB = *((PianoStation_t * const *) b); return stationA->isQuickMix - stationB->isQuickMix; } /* sort by station name from a to z, case insensitive */ static inline int BarStationNameAZCmp (const void *a, const void *b) { - const PianoStation_t *stationA = *((PianoStation_t **) a), - *stationB = *((PianoStation_t **) b); + const PianoStation_t *stationA = *((PianoStation_t * const *) a), + *stationB = *((PianoStation_t * const *) b); return strcasecmp (stationA->name, stationB->name); } |