From 11c06cace6b7d98c57207016b00f2a851633c4ce Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 6 Oct 2011 22:20:57 -0700 Subject: Add const attributes to fix gcc -Wwrite-strings warnings Signed-off-by: Alan Coopersmith --- constype.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/constype.c b/constype.c index 05a6cd6..d5946b9 100644 --- a/constype.c +++ b/constype.c @@ -44,13 +44,13 @@ style. #include #include -static int wu_fbid(const char *devname, char **fbname, int *fbtype); +static int wu_fbid(const char *devname, const char **fbname, int *fbtype); int main (int argc, char **argv) { int fbtype = -1; - char *fbname, *dev; + const char *fbname, *dev; int print_num = 0; int error; @@ -103,7 +103,7 @@ main (int argc, char **argv) * FBTYPE_SUNxGP becomes gpx * FBTYPE_NOTSUN[1-9] becomes ns[A-J] */ -static char *decode_fb[] = { +static const char *decode_fb[] = { "bw1", "cg1", "bw2", "cg2", "gp2", @@ -140,7 +140,7 @@ static char *decode_fb[] = { }; static int -wu_fbid(const char* devname, char** fbname, int* fbtype) +wu_fbid(const char* devname, const char** fbname, int* fbtype) { struct fbgattr fbattr; int fd, ioctl_ret; -- cgit v1.2.3