hw/xwin: Fix const warnings in winprefsyacc.y
winprefsyacc.y:174:5: warning: passing argument 1 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.y:174:5: warning: passing argument 3 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.y:175:5: warning: passing argument 3 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.y:178:5: warning: passing argument 3 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.c:1737:9: warning: passing argument 1 of ‘yyerror’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:82:12: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.c:1854:3: warning: passing argument 1 of ‘yyerror’ discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
394ad25959
commit
593c6b1934
|
@ -64,7 +64,7 @@ static void SetDefaultSysMenu (char *menu, int pos);
|
||||||
static void SetTrayIcon (char *fname);
|
static void SetTrayIcon (char *fname);
|
||||||
|
|
||||||
static void OpenMenu(char *menuname);
|
static void OpenMenu(char *menuname);
|
||||||
static void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param);
|
static void AddMenuLine(const char *name, MENUCOMMANDTYPE cmd, const char *param);
|
||||||
static void CloseMenu(void);
|
static void CloseMenu(void);
|
||||||
|
|
||||||
static void OpenIcons(void);
|
static void OpenIcons(void);
|
||||||
|
@ -79,7 +79,7 @@ static void OpenSysMenu(void);
|
||||||
static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
|
static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
|
||||||
static void CloseSysMenu(void);
|
static void CloseSysMenu(void);
|
||||||
|
|
||||||
static int yyerror (char *s);
|
static int yyerror (const char *s);
|
||||||
|
|
||||||
extern char *yytext;
|
extern char *yytext;
|
||||||
extern int yylex(void);
|
extern int yylex(void);
|
||||||
|
@ -252,7 +252,7 @@ debug: DEBUGOUTPUT STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($
|
||||||
* Errors in parsing abort and print log messages
|
* Errors in parsing abort and print log messages
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
yyerror (char *s)
|
yyerror (const char *s)
|
||||||
{
|
{
|
||||||
extern int yylineno; /* Handled by flex internally */
|
extern int yylineno; /* Handled by flex internally */
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ OpenMenu (char *menuname)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param)
|
AddMenuLine (const char *text, MENUCOMMANDTYPE cmd, const char *param)
|
||||||
{
|
{
|
||||||
if (menu.menuItem==NULL)
|
if (menu.menuItem==NULL)
|
||||||
menu.menuItem = malloc(sizeof(MENUITEM));
|
menu.menuItem = malloc(sizeof(MENUITEM));
|
||||||
|
|
Loading…
Reference in New Issue