From: Jan Engelhardt Date: Thu, 11 Nov 2010 22:27:21 +0000 (+0100) Subject: xkbscan: resolve build warning/rpmlint error X-Git-Tag: xkbcommon-0.2.0~830 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f8301ebc5697ce6c865b5a7007aca72f31fd9686;p=platform%2Fupstream%2Flibxkbcommon.git xkbscan: resolve build warning/rpmlint error xkbscan.l: In function 'setScanState': xkbscan.l:201:1: warning: control reaches end of non-void function I: Program returns random data in a function E: libxkbcommon no-return-in-nonvoid-function xkbscan.l:201 Change return type of setScanState to void, since a return value is never used by its callers. Signed-off-by: Jan Engelhardt --- diff --git a/src/xkbcomp/parseutils.h b/src/xkbcomp/parseutils.h index 6169b87..9cf5097 100644 --- a/src/xkbcomp/parseutils.h +++ b/src/xkbcomp/parseutils.h @@ -191,8 +191,8 @@ extern void yyerror(const char * /* s */ extern int yylex(void); extern int yyparse(void); -extern int setScanState(char * /* file */ , - int /* line */ +extern void setScanState(char * /* file */ , + int /* line */ ); extern FILE *yyin; diff --git a/src/xkbcomp/xkbscan.l b/src/xkbcomp/xkbscan.l index 0d3cab6..5ffec1b 100644 --- a/src/xkbcomp/xkbscan.l +++ b/src/xkbcomp/xkbscan.l @@ -193,7 +193,7 @@ yyerror(const char *s) return; } -int setScanState(char *file, int lineno) +void setScanState(char *file, int lineno) { yylineno = 1; scanFile = file;