summaryrefslogtreecommitdiff
path: root/list.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-04 21:00:11 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-04 21:02:06 -0700
commitb2d0f04a50f1444f9d62d11636a28c89951f0f40 (patch)
treeea962d23f843a8d20401ddf0ec978c5914549111 /list.h
parent0f4f6462597841e5f8470571d56cfda61144ee8f (diff)
Add const attributes to fix gcc -Wwrite-strings warnings
Does not fix all of them since some lists contain constant strings and some contain dynamically allocated strings that need to be freed later. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'list.h')
-rw-r--r--list.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/list.h b/list.h
index 7403bc0..c68a78d 100644
--- a/list.h
+++ b/list.h
@@ -32,11 +32,11 @@ typedef struct _List {
struct _List *next;
} ListRec, *ListPtr;
-int listMember(char *elt, ListPtr list);
+int listMember(const char *elt, ListPtr list);
ListPtr listCons(char *car, ListPtr cdr);
ListPtr listAdjoin(char *car, ListPtr cdr);
-ListPtr listConsF(ListPtr cdr, char *f, ...) _X_ATTRIBUTE_PRINTF(2,3);
-ListPtr listAdjoinF(ListPtr cdr, char *f, ...) _X_ATTRIBUTE_PRINTF(2,3);
+ListPtr listConsF(ListPtr cdr, const char *f, ...) _X_ATTRIBUTE_PRINTF(2,3);
+ListPtr listAdjoinF(ListPtr cdr, const char *f, ...) _X_ATTRIBUTE_PRINTF(2,3);
int listLength(ListPtr list);
ListPtr appendList(ListPtr first, ListPtr second);
ListPtr makeList(char **a, int n, ListPtr old, int begin);