summaryrefslogtreecommitdiffstats
path: root/common/ini
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-07-03 12:19:12 -0400
committerSimo Sorce <ssorce@redhat.com>2009-07-03 12:36:25 -0400
commit550f27dbdbd00024e483b989ebc033b2cbe0d239 (patch)
tree3cc1875f04808a021eb85ceb3ae6201e4c0b32f6 /common/ini
parent19727007c9948ee92a9505efae6692ea38c96a3e (diff)
downloadsssd-550f27dbdbd00024e483b989ebc033b2cbe0d239.tar.gz
sssd-550f27dbdbd00024e483b989ebc033b2cbe0d239.tar.xz
sssd-550f27dbdbd00024e483b989ebc033b2cbe0d239.zip
Clean up warnings in common/
Fix consts and function declarations
Diffstat (limited to 'common/ini')
-rw-r--r--common/ini/ini_config.c4
-rw-r--r--common/ini/ini_config.h2
-rw-r--r--common/ini/ini_config_ut.c10
3 files changed, 8 insertions, 8 deletions
diff --git a/common/ini/ini_config.c b/common/ini/ini_config.c
index 9b23c94cd..4f4ac2f24 100644
--- a/common/ini/ini_config.c
+++ b/common/ini/ini_config.c
@@ -1408,9 +1408,9 @@ void free_bin_config_value(char *value)
/* Arrays of stings and integers */
char **get_string_config_array(struct collection_item *item,
- char *sep, int *size, int *error)
+ const char *sep, int *size, int *error)
{
- char defsep[] = ",";
+ const char *defsep = ",";
char *copy = NULL;
char *dest = NULL;
int lensep;
diff --git a/common/ini/ini_config.h b/common/ini/ini_config.h
index 46e83d1c5..05ab27dff 100644
--- a/common/ini/ini_config.h
+++ b/common/ini/ini_config.h
@@ -216,7 +216,7 @@ void free_bin_config_value(char *);
/* Array of stings */
/* Separator sting includes up to three different separators. If NULL comma is assumed. */
/* The spaces are trimmed automatically around separators in the string. */
-char **get_string_config_array(struct collection_item *item, char *sep, int *size, int *error);
+char **get_string_config_array(struct collection_item *item, const char *sep, int *size, int *error);
/* Array of long values - separators are detected automatically. */
/* The length of the allocated array is returned in "size" */
long *get_long_config_array(struct collection_item *item, int *size, int *error);
diff --git a/common/ini/ini_config_ut.c b/common/ini/ini_config_ut.c
index 249127380..58a5d7629 100644
--- a/common/ini/ini_config_ut.c
+++ b/common/ini/ini_config_ut.c
@@ -28,7 +28,7 @@
#include "collection_tools.h"
-int basic_test()
+int basic_test(void)
{
int error;
struct collection_item *ini_config = NULL;
@@ -56,7 +56,7 @@ int basic_test()
return 0;
}
-int single_file()
+int single_file(void)
{
int error;
struct collection_item *ini_config = NULL;
@@ -118,7 +118,7 @@ int single_file()
return 0;
}
-int negative_test()
+int negative_test(void)
{
int error;
unsigned int count;
@@ -241,7 +241,7 @@ int real_test(const char *file)
return 0;
}
-int get_test()
+int get_test(void)
{
int error;
@@ -797,7 +797,7 @@ int get_test()
return EOK;
}
-int main()
+int main(int argc, char *argv[])
{
int error;