From 8b8c23e1f7c12fd247253c5f7dc9d86c96ed6d5e Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 1 Apr 2013 22:36:07 +0200 Subject: [PATCH] via_lvds.c fix warning, char* compared to string literal gcc 4.7.2 issues a warning which make 'open suse build system' fail. via_lvds.c: In function 'via_lvds_detect': via_lvds.c:1305:26: warning: comparison with string literal results in unspecified behavior [-Waddress] --- src/via_lvds.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/via_lvds.c b/src/via_lvds.c index e4e5cdf..0dcc64a 100644 --- a/src/via_lvds.c +++ b/src/via_lvds.c @@ -1295,6 +1295,7 @@ ViaPanelLookUpModeIndex(int width, int height) static xf86OutputStatus via_lvds_detect(xf86OutputPtr output) { + static const char xoId[] = "OLPC XO 1.5"; xf86OutputStatus status = XF86OutputStatusDisconnected; ViaPanelInfoPtr panel = output->driver_private; ScrnInfoPtr pScrn = output->scrn; @@ -1302,7 +1303,7 @@ via_lvds_detect(xf86OutputPtr output) vgaHWPtr hwp = VGAHWPTR(pScrn); /* Hardcode panel size for the XO */ - if (pVia->Id->String == "OLPC XO 1.5") { + if(strcmp(pVia->Id->String, xoId) == 0) { panel->NativeWidth = 1200; panel->NativeHeight = 900; status = XF86OutputStatusConnected; -- 1.7.7