[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    [PATCH 4/5] xkbscan: resolve build warning/rpmlint error
From:       Jan Engelhardt <jengelh () medozas ! de>
Date:       2010-11-28 14:47:02
Message-ID: 1290955624-18377-5-git-send-email-jengelh () medozas ! de
[Download RAW message or body]

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 <jengelh@medozas.de>
---
 src/xkbcomp/parseutils.h |    4 ++--
 src/xkbcomp/xkbscan.l    |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

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;
-- 
1.7.1

_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: freedesktop-xorg@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic