From 6fbdc721d972d8c1f823acd5473a3dce8836d5fa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 5 Feb 2008 10:17:33 +0000 Subject: fix -Wconst warnings [ew: cleaned up the dirty union hack a bit] Signed-off-by: Eric Wong git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugin.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/inputPlugin.c') diff --git a/src/inputPlugin.c b/src/inputPlugin.c index e9c6d4a70..18d869268 100644 --- a/src/inputPlugin.c +++ b/src/inputPlugin.c @@ -44,7 +44,7 @@ void unloadInputPlugin(InputPlugin * inputPlugin) deleteFromList(inputPlugin_list, inputPlugin->name); } -static int stringFoundInStringArray(char **array, char *suffix) +static int stringFoundInStringArray(const char *const*array, const char *suffix) { while (array && *array) { if (strcasecmp(*array, suffix) == 0) @@ -55,7 +55,7 @@ static int stringFoundInStringArray(char **array, char *suffix) return 0; } -InputPlugin *getInputPluginFromSuffix(char *suffix, unsigned int next) +InputPlugin *getInputPluginFromSuffix(const char *suffix, unsigned int next) { static ListNode *pos; ListNode *node; @@ -84,7 +84,7 @@ InputPlugin *getInputPluginFromSuffix(char *suffix, unsigned int next) return NULL; } -InputPlugin *getInputPluginFromMimeType(char *mimeType, unsigned int next) +InputPlugin *getInputPluginFromMimeType(const char *mimeType, unsigned int next) { static ListNode *pos; ListNode *node; @@ -107,7 +107,7 @@ InputPlugin *getInputPluginFromMimeType(char *mimeType, unsigned int next) return NULL; } -InputPlugin *getInputPluginFromName(char *name) +InputPlugin *getInputPluginFromName(const char *name) { void *plugin = NULL; @@ -120,7 +120,7 @@ void printAllInputPluginSuffixes(FILE * fp) { ListNode *node = inputPlugin_list->firstNode; InputPlugin *plugin; - char **suffixes; + const char *const*suffixes; while (node) { plugin = (InputPlugin *) node->data; -- cgit v1.2.3