[PATCH 25/25] xf86 parser: convert Error to a varargs macro to clear gcc format warnings
Alan Coopersmith
alan.coopersmith at oracle.com
Sun Dec 11 10:16:38 PST 2011
Previously it always passed a format string with exactly one argument,
using NULL when the format string needed none. Now pass the right number
of arguments to clear gcc warnings of 'too many arguments for format'.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
hw/xfree86/parser/Configint.h | 4 +-
hw/xfree86/parser/DRI.c | 4 +-
hw/xfree86/parser/Device.c | 4 +-
hw/xfree86/parser/Extensions.c | 2 +-
hw/xfree86/parser/Files.c | 2 +-
hw/xfree86/parser/Flags.c | 4 +-
hw/xfree86/parser/Input.c | 4 +-
hw/xfree86/parser/InputClass.c | 4 +-
hw/xfree86/parser/Layout.c | 28 +++++++-------
hw/xfree86/parser/Module.c | 4 +-
hw/xfree86/parser/Monitor.c | 84 ++++++++++++++++++++--------------------
hw/xfree86/parser/Pointer.c | 8 ++--
hw/xfree86/parser/Screen.c | 36 ++++++++--------
hw/xfree86/parser/Vendor.c | 6 +-
hw/xfree86/parser/Video.c | 6 +-
15 files changed, 100 insertions(+), 100 deletions(-)
diff --git a/hw/xfree86/parser/Configint.h b/hw/xfree86/parser/Configint.h
index 82d7de4..3f84ff0 100644
--- a/hw/xfree86/parser/Configint.h
+++ b/hw/xfree86/parser/Configint.h
@@ -119,8 +119,8 @@ else\
}\
}
-#define Error(a,b) do { \
- xf86parseError (a, b); CLEANUP (ptr); return NULL; \
+#define Error(...) do { \
+ xf86parseError (__VA_ARGS__); CLEANUP (ptr); return NULL; \
} while (0)
/*
diff --git a/hw/xfree86/parser/DRI.c b/hw/xfree86/parser/DRI.c
index f51f6b9..77846da 100644
--- a/hw/xfree86/parser/DRI.c
+++ b/hw/xfree86/parser/DRI.c
@@ -64,7 +64,7 @@ xf86parseDRISection (void)
else if (token == NUMBER)
ptr->dri_group = val.num;
else
- Error (GROUP_MSG, NULL);
+ Error (GROUP_MSG);
break;
case MODE:
if (xf86getSubToken (&(ptr->dri_comment)) != NUMBER)
@@ -74,7 +74,7 @@ xf86parseDRISection (void)
ptr->dri_mode = val.num;
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
case COMMENT:
ptr->dri_comment = xf86addComment(ptr->dri_comment, val.str);
diff --git a/hw/xfree86/parser/Device.c b/hw/xfree86/parser/Device.c
index d71abc6..d99dbf7 100644
--- a/hw/xfree86/parser/Device.c
+++ b/hw/xfree86/parser/Device.c
@@ -245,7 +245,7 @@ xf86parseDeviceSection (void)
ptr->dev_screen = val.num;
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -254,7 +254,7 @@ xf86parseDeviceSection (void)
}
if (!has_ident)
- Error (NO_IDENT_MSG, NULL);
+ Error (NO_IDENT_MSG);
#ifdef DEBUG
printf ("Device section parsed\n");
diff --git a/hw/xfree86/parser/Extensions.c b/hw/xfree86/parser/Extensions.c
index 4003b52..662f526 100644
--- a/hw/xfree86/parser/Extensions.c
+++ b/hw/xfree86/parser/Extensions.c
@@ -62,7 +62,7 @@ xf86parseExtensionsSection (void)
ptr->ext_option_lst = xf86parseOption(ptr->ext_option_lst);
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
case COMMENT:
ptr->extensions_comment =
diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c
index 0c71835..a95be9e 100644
--- a/hw/xfree86/parser/Files.c
+++ b/hw/xfree86/parser/Files.c
@@ -162,7 +162,7 @@ xf86parseFilesSection (void)
ptr->file_xkbdir = val.str;
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
case OBSOLETE_TOKEN:
xf86parseError (OBSOLETE_MSG, xf86tokenString ());
diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c
index 87fd3ed..c2a0406 100644
--- a/hw/xfree86/parser/Flags.c
+++ b/hw/xfree86/parser/Flags.c
@@ -160,7 +160,7 @@ xf86parseFlagsSection (void)
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -440,7 +440,7 @@ xf86parseOption(XF86OptionPtr head)
int token;
if ((token = xf86getSubToken(&comment)) != STRING) {
- xf86parseError(BAD_OPTION_MSG, NULL);
+ xf86parseError(BAD_OPTION_MSG);
free(comment);
return head;
}
diff --git a/hw/xfree86/parser/Input.c b/hw/xfree86/parser/Input.c
index faff0f4..e603773 100644
--- a/hw/xfree86/parser/Input.c
+++ b/hw/xfree86/parser/Input.c
@@ -114,7 +114,7 @@ xf86parseInputSection (void)
ptr->inp_option_lst = xf86parseOption(ptr->inp_option_lst);
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -123,7 +123,7 @@ xf86parseInputSection (void)
}
if (!has_ident)
- Error (NO_IDENT_MSG, NULL);
+ Error (NO_IDENT_MSG);
#ifdef DEBUG
printf ("InputDevice section parsed\n");
diff --git a/hw/xfree86/parser/InputClass.c b/hw/xfree86/parser/InputClass.c
index 2cdc912..919ae18 100644
--- a/hw/xfree86/parser/InputClass.c
+++ b/hw/xfree86/parser/InputClass.c
@@ -241,7 +241,7 @@ xf86parseInputClassSection(void)
Error(BOOL_MSG, "MatchIsTouchscreen");
break;
case EOF_TOKEN:
- Error(UNEXPECTED_EOF_MSG, NULL);
+ Error(UNEXPECTED_EOF_MSG);
break;
default:
Error(INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -250,7 +250,7 @@ xf86parseInputClassSection(void)
}
if (!has_ident)
- Error(NO_IDENT_MSG, NULL);
+ Error(NO_IDENT_MSG);
#ifdef DEBUG
printf("InputClass section parsed\n");
diff --git a/hw/xfree86/parser/Layout.c b/hw/xfree86/parser/Layout.c
index 4487b0d..7dd4ebf 100644
--- a/hw/xfree86/parser/Layout.c
+++ b/hw/xfree86/parser/Layout.c
@@ -124,7 +124,7 @@ xf86parseLayoutSection (void)
iptr->list.next = NULL;
if (xf86getSubToken (&(ptr->lay_comment)) != STRING) {
free (iptr);
- Error (INACTIVE_MSG, NULL);
+ Error (INACTIVE_MSG);
}
iptr->inactive_device_str = val.str;
ptr->lay_inactive_lst = (XF86ConfInactivePtr)
@@ -150,7 +150,7 @@ xf86parseLayoutSection (void)
token = xf86getSubToken(&(ptr->lay_comment));
if (token != STRING) {
free(aptr);
- Error (SCREEN_MSG, NULL);
+ Error (SCREEN_MSG);
}
aptr->adj_screen_str = val.str;
@@ -178,7 +178,7 @@ xf86parseLayoutSection (void)
break;
case EOF_TOKEN:
free(aptr);
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
xf86unGetToken (token);
@@ -199,13 +199,13 @@ xf86parseLayoutSection (void)
token = xf86getSubToken(&(ptr->lay_comment));
if (token != NUMBER) {
free(aptr);
- Error(INVALID_SCR_MSG, NULL);
+ Error(INVALID_SCR_MSG);
}
aptr->adj_y = val.num;
} else {
if (absKeyword) {
free(aptr);
- Error(INVALID_SCR_MSG, NULL);
+ Error(INVALID_SCR_MSG);
} else
xf86unGetToken (token);
}
@@ -218,7 +218,7 @@ xf86parseLayoutSection (void)
token = xf86getSubToken(&(ptr->lay_comment));
if (token != STRING) {
free(aptr);
- Error(INVALID_SCR_MSG, NULL);
+ Error(INVALID_SCR_MSG);
}
aptr->adj_refscreen = val.str;
if (aptr->adj_where == CONF_ADJ_RELATIVE)
@@ -226,13 +226,13 @@ xf86parseLayoutSection (void)
token = xf86getSubToken(&(ptr->lay_comment));
if (token != NUMBER) {
free(aptr);
- Error(INVALID_SCR_MSG, NULL);
+ Error(INVALID_SCR_MSG);
}
aptr->adj_x = val.num;
token = xf86getSubToken(&(ptr->lay_comment));
if (token != NUMBER) {
free(aptr);
- Error(INVALID_SCR_MSG, NULL);
+ Error(INVALID_SCR_MSG);
}
aptr->adj_y = val.num;
}
@@ -244,21 +244,21 @@ xf86parseLayoutSection (void)
/* bottom */
if (xf86getSubToken (&(ptr->lay_comment)) != STRING) {
free(aptr);
- Error (SCREEN_MSG, NULL);
+ Error (SCREEN_MSG);
}
aptr->adj_bottom_str = val.str;
/* left */
if (xf86getSubToken (&(ptr->lay_comment)) != STRING) {
free(aptr);
- Error (SCREEN_MSG, NULL);
+ Error (SCREEN_MSG);
}
aptr->adj_left_str = val.str;
/* right */
if (xf86getSubToken (&(ptr->lay_comment)) != STRING) {
free(aptr);
- Error (SCREEN_MSG, NULL);
+ Error (SCREEN_MSG);
}
aptr->adj_right_str = val.str;
@@ -276,7 +276,7 @@ xf86parseLayoutSection (void)
iptr->iref_option_lst = NULL;
if (xf86getSubToken (&(ptr->lay_comment)) != STRING) {
free(iptr);
- Error (INPUTDEV_MSG, NULL);
+ Error (INPUTDEV_MSG);
}
iptr->iref_inputdev_str = val.str;
while ((token = xf86getSubToken (&(ptr->lay_comment))) == STRING)
@@ -293,7 +293,7 @@ xf86parseLayoutSection (void)
ptr->lay_option_lst = xf86parseOption(ptr->lay_option_lst);
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -302,7 +302,7 @@ xf86parseLayoutSection (void)
}
if (!has_ident)
- Error (NO_IDENT_MSG, NULL);
+ Error (NO_IDENT_MSG);
#ifdef DEBUG
printf ("Layout section parsed\n");
diff --git a/hw/xfree86/parser/Module.c b/hw/xfree86/parser/Module.c
index ca323fc..3c4cefc 100644
--- a/hw/xfree86/parser/Module.c
+++ b/hw/xfree86/parser/Module.c
@@ -107,7 +107,7 @@ xf86parseModuleSubSection (XF86LoadPtr head, char *name)
ptr->load_opt = xf86parseOption(ptr->load_opt);
break;
case EOF_TOKEN:
- xf86parseError (UNEXPECTED_EOF_MSG, NULL);
+ xf86parseError (UNEXPECTED_EOF_MSG);
free(ptr);
return NULL;
default:
@@ -163,7 +163,7 @@ xf86parseModuleSection (void)
xf86parseModuleSubSection (ptr->mod_load_lst, val.str);
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
diff --git a/hw/xfree86/parser/Monitor.c b/hw/xfree86/parser/Monitor.c
index 970406d..52c5500 100644
--- a/hw/xfree86/parser/Monitor.c
+++ b/hw/xfree86/parser/Monitor.c
@@ -145,52 +145,52 @@ xf86parseModeLine (void)
/* Identifier */
if (xf86getSubToken (&(ptr->ml_comment)) != STRING)
- Error ("ModeLine identifier expected", NULL);
+ Error ("ModeLine identifier expected");
ptr->ml_identifier = val.str;
/* DotClock */
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("ModeLine dotclock expected", NULL);
+ Error ("ModeLine dotclock expected");
ptr->ml_clock = (int) (val.realnum * 1000.0 + 0.5);
/* HDisplay */
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("ModeLine Hdisplay expected", NULL);
+ Error ("ModeLine Hdisplay expected");
ptr->ml_hdisplay = val.num;
/* HSyncStart */
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("ModeLine HSyncStart expected", NULL);
+ Error ("ModeLine HSyncStart expected");
ptr->ml_hsyncstart = val.num;
/* HSyncEnd */
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("ModeLine HSyncEnd expected", NULL);
+ Error ("ModeLine HSyncEnd expected");
ptr->ml_hsyncend = val.num;
/* HTotal */
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("ModeLine HTotal expected", NULL);
+ Error ("ModeLine HTotal expected");
ptr->ml_htotal = val.num;
/* VDisplay */
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("ModeLine Vdisplay expected", NULL);
+ Error ("ModeLine Vdisplay expected");
ptr->ml_vdisplay = val.num;
/* VSyncStart */
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("ModeLine VSyncStart expected", NULL);
+ Error ("ModeLine VSyncStart expected");
ptr->ml_vsyncstart = val.num;
/* VSyncEnd */
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("ModeLine VSyncEnd expected", NULL);
+ Error ("ModeLine VSyncEnd expected");
ptr->ml_vsyncend = val.num;
/* VTotal */
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("ModeLine VTotal expected", NULL);
+ Error ("ModeLine VTotal expected");
ptr->ml_vtotal = val.num;
token = xf86getSubTokenWithTab (&(ptr->ml_comment), TimingTab);
@@ -247,7 +247,7 @@ xf86parseModeLine (void)
ptr->ml_flags |= XF86CONF_VSCAN;
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -271,7 +271,7 @@ xf86parseVerboseMode (void)
parsePrologue (XF86ConfModeLinePtr, XF86ConfModeLineRec)
if (xf86getSubToken (&(ptr->ml_comment)) != STRING)
- Error ("Mode name expected", NULL);
+ Error ("Mode name expected");
ptr->ml_identifier = val.str;
while ((token = xf86getToken (ModeTab)) != ENDMODE)
{
@@ -290,44 +290,44 @@ xf86parseVerboseMode (void)
if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
ptr->ml_hdisplay = val.num;
else
- Error ("Horizontal display expected", NULL);
+ Error ("Horizontal display expected");
if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
ptr->ml_hsyncstart = val.num;
else
- Error ("Horizontal sync start expected", NULL);
+ Error ("Horizontal sync start expected");
if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
ptr->ml_hsyncend = val.num;
else
- Error ("Horizontal sync end expected", NULL);
+ Error ("Horizontal sync end expected");
if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
ptr->ml_htotal = val.num;
else
- Error ("Horizontal total expected", NULL);
+ Error ("Horizontal total expected");
had_htimings = 1;
break;
case VTIMINGS:
if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
ptr->ml_vdisplay = val.num;
else
- Error ("Vertical display expected", NULL);
+ Error ("Vertical display expected");
if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
ptr->ml_vsyncstart = val.num;
else
- Error ("Vertical sync start expected", NULL);
+ Error ("Vertical sync start expected");
if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
ptr->ml_vsyncend = val.num;
else
- Error ("Vertical sync end expected", NULL);
+ Error ("Vertical sync end expected");
if (xf86getSubToken (&(ptr->ml_comment)) == NUMBER)
ptr->ml_vtotal = val.num;
else
- Error ("Vertical total expected", NULL);
+ Error ("Vertical total expected");
had_vtimings = 1;
break;
case FLAGS:
@@ -367,10 +367,10 @@ xf86parseVerboseMode (void)
ptr->ml_flags |= XF86CONF_DBLSCAN;
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
- Error ("Unknown flag string", NULL);
+ Error ("Unknown flag string");
break;
}
token = xf86getSubToken (&(ptr->ml_comment));
@@ -379,29 +379,29 @@ xf86parseVerboseMode (void)
break;
case HSKEW:
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("Horizontal skew expected", NULL);
+ Error ("Horizontal skew expected");
ptr->ml_flags |= XF86CONF_HSKEW;
ptr->ml_hskew = val.num;
break;
case VSCAN:
if (xf86getSubToken (&(ptr->ml_comment)) != NUMBER)
- Error ("Vertical scan count expected", NULL);
+ Error ("Vertical scan count expected");
ptr->ml_flags |= XF86CONF_VSCAN;
ptr->ml_vscan = val.num;
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
- Error ("Unexepcted token in verbose \"Mode\" entry\n", NULL);
+ Error ("Unexepcted token in verbose \"Mode\" entry\n");
}
}
if (!had_dotclock)
- Error ("the dotclock is missing", NULL);
+ Error ("the dotclock is missing");
if (!had_htimings)
- Error ("the horizontal timings are missing", NULL);
+ Error ("the horizontal timings are missing");
if (!had_vtimings)
- Error ("the vertical timings are missing", NULL);
+ Error ("the vertical timings are missing");
#ifdef DEBUG
printf ("Verbose Mode parsed\n");
@@ -455,19 +455,19 @@ xf86parseMonitorSection (void)
break;
case DISPLAYSIZE:
if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER)
- Error (DISPLAYSIZE_MSG, NULL);
+ Error (DISPLAYSIZE_MSG);
ptr->mon_width = val.realnum;
if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER)
- Error (DISPLAYSIZE_MSG, NULL);
+ Error (DISPLAYSIZE_MSG);
ptr->mon_height = val.realnum;
break;
case HORIZSYNC:
if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER)
- Error (HORIZSYNC_MSG, NULL);
+ Error (HORIZSYNC_MSG);
do {
if (ptr->mon_n_hsync >= CONF_MAX_HSYNC)
- Error ("Sorry. Too many horizontal sync intervals.", NULL);
+ Error ("Sorry. Too many horizontal sync intervals.");
ptr->mon_hsync[ptr->mon_n_hsync].lo = val.realnum;
switch (token = xf86getSubToken (&(ptr->mon_comment)))
{
@@ -478,7 +478,7 @@ xf86parseMonitorSection (void)
case DASH:
if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER ||
(float)val.realnum < ptr->mon_hsync[ptr->mon_n_hsync].lo)
- Error (HORIZSYNC_MSG, NULL);
+ Error (HORIZSYNC_MSG);
ptr->mon_hsync[ptr->mon_n_hsync].hi = val.realnum;
if ((token = xf86getSubToken (&(ptr->mon_comment))) == COMMA)
break;
@@ -501,7 +501,7 @@ HorizDone:
case VERTREFRESH:
if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER)
- Error (VERTREFRESH_MSG, NULL);
+ Error (VERTREFRESH_MSG);
do {
ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo = val.realnum;
switch (token = xf86getSubToken (&(ptr->mon_comment)))
@@ -513,7 +513,7 @@ HorizDone:
case DASH:
if (xf86getSubToken (&(ptr->mon_comment)) != NUMBER ||
(float)val.realnum < ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo)
- Error (VERTREFRESH_MSG, NULL);
+ Error (VERTREFRESH_MSG);
ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = val.realnum;
if ((token = xf86getSubToken (&(ptr->mon_comment))) == COMMA)
break;
@@ -529,7 +529,7 @@ HorizDone:
goto VertDone;
}
if (ptr->mon_n_vrefresh >= CONF_MAX_VREFRESH)
- Error ("Sorry. Too many vertical refresh intervals.", NULL);
+ Error ("Sorry. Too many vertical refresh intervals.");
ptr->mon_n_vrefresh++;
} while ((token = xf86getSubToken (&(ptr->mon_comment))) == NUMBER);
VertDone:
@@ -539,7 +539,7 @@ VertDone:
case GAMMA:
if( xf86getSubToken (&(ptr->mon_comment)) != NUMBER )
{
- Error (INVALID_GAMMA_MSG, NULL);
+ Error (INVALID_GAMMA_MSG);
}
else
{
@@ -554,7 +554,7 @@ VertDone:
}
else
{
- Error (INVALID_GAMMA_MSG, NULL);
+ Error (INVALID_GAMMA_MSG);
}
}
else
@@ -583,7 +583,7 @@ VertDone:
}
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
xf86parseError (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -594,7 +594,7 @@ VertDone:
}
if (!has_ident)
- Error (NO_IDENT_MSG, NULL);
+ Error (NO_IDENT_MSG);
#ifdef DEBUG
printf ("Monitor section parsed\n");
@@ -644,7 +644,7 @@ xf86parseModesSection (void)
}
if (!has_ident)
- Error (NO_IDENT_MSG, NULL);
+ Error (NO_IDENT_MSG);
#ifdef DEBUG
printf ("Modes section parsed\n");
diff --git a/hw/xfree86/parser/Pointer.c b/hw/xfree86/parser/Pointer.c
index e8ad290..4edbf74 100644
--- a/hw/xfree86/parser/Pointer.c
+++ b/hw/xfree86/parser/Pointer.c
@@ -184,10 +184,10 @@ xf86parsePointerSection (void)
switch (xf86getToken(ZMapTab)) {
case NUMBER:
if (val.num < 0)
- Error (ZAXISMAPPING_MSG, NULL);
+ Error (ZAXISMAPPING_MSG);
val1 = val.num;
if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER || val.num < 0) {
- Error (ZAXISMAPPING_MSG, NULL);
+ Error (ZAXISMAPPING_MSG);
}
if (asprintf(&s, "%lu %u", val1, val.num) == -1)
s = NULL;
@@ -199,7 +199,7 @@ xf86parsePointerSection (void)
s = strdup("y");
break;
default:
- Error (ZAXISMAPPING_MSG, NULL);
+ Error (ZAXISMAPPING_MSG);
break;
}
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
@@ -209,7 +209,7 @@ xf86parsePointerSection (void)
case ALWAYSCORE:
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
diff --git a/hw/xfree86/parser/Screen.c b/hw/xfree86/parser/Screen.c
index dd2319d..2ca2c57 100644
--- a/hw/xfree86/parser/Screen.c
+++ b/hw/xfree86/parser/Screen.c
@@ -101,18 +101,18 @@ xf86parseDisplaySubSection (void)
break;
case VIEWPORT:
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (VIEWPORT_MSG, NULL);
+ Error (VIEWPORT_MSG);
ptr->disp_frameX0 = val.num;
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (VIEWPORT_MSG, NULL);
+ Error (VIEWPORT_MSG);
ptr->disp_frameY0 = val.num;
break;
case VIRTUAL:
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (VIRTUAL_MSG, NULL);
+ Error (VIRTUAL_MSG);
ptr->disp_virtualX = val.num;
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (VIRTUAL_MSG, NULL);
+ Error (VIRTUAL_MSG);
ptr->disp_virtualY = val.num;
break;
case DEPTH:
@@ -132,35 +132,35 @@ xf86parseDisplaySubSection (void)
break;
case WEIGHT:
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (WEIGHT_MSG, NULL);
+ Error (WEIGHT_MSG);
ptr->disp_weight.red = val.num;
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (WEIGHT_MSG, NULL);
+ Error (WEIGHT_MSG);
ptr->disp_weight.green = val.num;
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (WEIGHT_MSG, NULL);
+ Error (WEIGHT_MSG);
ptr->disp_weight.blue = val.num;
break;
case BLACK_TOK:
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (BLACK_MSG, NULL);
+ Error (BLACK_MSG);
ptr->disp_black.red = val.num;
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (BLACK_MSG, NULL);
+ Error (BLACK_MSG);
ptr->disp_black.green = val.num;
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (BLACK_MSG, NULL);
+ Error (BLACK_MSG);
ptr->disp_black.blue = val.num;
break;
case WHITE_TOK:
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (WHITE_MSG, NULL);
+ Error (WHITE_MSG);
ptr->disp_white.red = val.num;
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (WHITE_MSG, NULL);
+ Error (WHITE_MSG);
ptr->disp_white.green = val.num;
if (xf86getSubToken (&(ptr->disp_comment)) != NUMBER)
- Error (WHITE_MSG, NULL);
+ Error (WHITE_MSG);
ptr->disp_white.blue = val.num;
break;
case MODES:
@@ -183,7 +183,7 @@ xf86parseDisplaySubSection (void)
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -302,10 +302,10 @@ xf86parseScreenSection (void)
break;
case VIRTUAL:
if (xf86getSubToken (&(ptr->scrn_comment)) != NUMBER)
- Error (VIRTUAL_MSG, NULL);
+ Error (VIRTUAL_MSG);
ptr->scrn_virtualX = val.num;
if (xf86getSubToken (&(ptr->scrn_comment)) != NUMBER)
- Error (VIRTUAL_MSG, NULL);
+ Error (VIRTUAL_MSG);
ptr->scrn_virtualY = val.num;
break;
case OPTION:
@@ -321,7 +321,7 @@ xf86parseScreenSection (void)
}
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -330,7 +330,7 @@ xf86parseScreenSection (void)
}
if (!has_ident && !has_driver)
- Error (NO_IDENT_MSG, NULL);
+ Error (NO_IDENT_MSG);
#ifdef DEBUG
printf ("Screen section parsed\n");
diff --git a/hw/xfree86/parser/Vendor.c b/hw/xfree86/parser/Vendor.c
index dce3f1c..d61f0a0 100644
--- a/hw/xfree86/parser/Vendor.c
+++ b/hw/xfree86/parser/Vendor.c
@@ -102,7 +102,7 @@ xf86parseVendorSubSection (void)
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -164,7 +164,7 @@ xf86parseVendorSection (void)
}
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -174,7 +174,7 @@ xf86parseVendorSection (void)
}
if (!has_ident)
- Error (NO_IDENT_MSG, NULL);
+ Error (NO_IDENT_MSG);
#ifdef DEBUG
printf ("Vendor section parsed\n");
diff --git a/hw/xfree86/parser/Video.c b/hw/xfree86/parser/Video.c
index 3774387..19a5418 100644
--- a/hw/xfree86/parser/Video.c
+++ b/hw/xfree86/parser/Video.c
@@ -117,7 +117,7 @@ xf86parseVideoPortSubSection (void)
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -205,7 +205,7 @@ xf86parseVideoAdaptorSection (void)
break;
case EOF_TOKEN:
- Error (UNEXPECTED_EOF_MSG, NULL);
+ Error (UNEXPECTED_EOF_MSG);
break;
default:
Error (INVALID_KEYWORD_MSG, xf86tokenString ());
@@ -214,7 +214,7 @@ xf86parseVideoAdaptorSection (void)
}
if (!has_ident)
- Error (NO_IDENT_MSG, NULL);
+ Error (NO_IDENT_MSG);
#ifdef DEBUG
printf ("VideoAdaptor section parsed\n");
--
1.7.3.2
More information about the xorg-devel
mailing list