summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-10 18:15:05 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-10 18:15:05 +0100
commitdb7462e1f5e3fd6bfeeeeb18e76231638d7f8c07 (patch)
treea20c21de2b104b98a575f2c7f2218205750fd8a5 /tests
parent08cd2f220ee84e51917cc76c19998b12b6d50407 (diff)
testdisplay: fixup smaller compiler warnings
const char * issues and redudant getopt stuff Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r--tests/testdisplay.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 0db3ec4a..dfbd27c7 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -102,11 +102,11 @@ uint32_t *fb_ptr;
struct type_name {
int type;
- char *name;
+ const char *name;
};
#define type_name_fn(res) \
-static char * res##_str(int type) { \
+static const char * res##_str(int type) { \
unsigned int i; \
for (i = 0; i < ARRAY_SIZE(res##_names); i++) { \
if (res##_names[i].type == type) \
@@ -1037,8 +1037,6 @@ static int update_display(void)
return 1;
}
-extern char *optarg;
-extern int optind, opterr, optopt;
static char optstr[] = "hiaf:s:d:p:mt";
static void usage(char *name)
@@ -1119,7 +1117,7 @@ static gboolean input_event(GIOChannel *source, GIOCondition condition,
int main(int argc, char **argv)
{
int c;
- char *modules[] = { "i915" };
+ const char *modules[] = { "i915" };
unsigned int i;
struct udev *u;
int ret = 0;