summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-06 22:20:57 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-06 22:20:57 -0700
commit11c06cace6b7d98c57207016b00f2a851633c4ce (patch)
tree42eda7165f5a1233594ddd8f3351742083b2599c
parenta30ee6d6ee9260d273898223035652557c8d7443 (diff)
Add const attributes to fix gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--constype.c8
1 files 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 <unistd.h>
#include <errno.h>
-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;