More warning fixes.
This commit is contained in:
parent
0fe814b530
commit
42b8c481e3
|
@ -39,7 +39,7 @@ void stringlist_free(struct stringlist* list, int freedata)
|
|||
struct stringfragment* next = f->next;
|
||||
if (freedata)
|
||||
{
|
||||
free(f->data);
|
||||
free((void*) f->data);
|
||||
f->data = NULL;
|
||||
}
|
||||
free(f);
|
||||
|
@ -54,7 +54,7 @@ void stringlist_init(struct stringlist* list)
|
|||
}
|
||||
|
||||
|
||||
char* stringlist_get(struct stringlist *list, int index)
|
||||
const char* stringlist_get(struct stringlist *list, int index)
|
||||
{
|
||||
struct stringfragment* f = list->first;
|
||||
int i = 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
struct stringfragment
|
||||
{
|
||||
char* data;
|
||||
const char* data;
|
||||
struct stringfragment* next;
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ extern void stringlist_addall(struct stringlist* list, struct stringlist* src);
|
|||
extern void stringlist_free(struct stringlist* list, int freedata);
|
||||
extern void stringlist_init(struct stringlist* list);
|
||||
extern int stringlist_count(struct stringlist *list);
|
||||
extern char* stringlist_get(struct stringlist *list, int index);
|
||||
extern const char* stringlist_get(struct stringlist *list, int index);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue