[svn] gpg-error - r206 - in trunk: . src
svn author marcus
cvs at cvs.gnupg.org
Wed Oct 29 13:52:44 CET 2008
Author: marcus
Date: 2008-10-29 13:52:44 +0100 (Wed, 29 Oct 2008)
New Revision: 206
Modified:
trunk/ChangeLog
trunk/src/mkstrtable.awk
Log:
2008-10-29 Marcus Brinkmann <marcus at g10code.de>
* src/mkstrtable.awk: Make generated code -W clean to silence gcc
warnings.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-08-06 16:08:52 UTC (rev 205)
+++ trunk/ChangeLog 2008-10-29 12:52:44 UTC (rev 206)
@@ -1,3 +1,8 @@
+2008-10-29 Marcus Brinkmann <marcus at g10code.de>
+
+ * src/mkstrtable.awk: Make generated code -W clean to silence gcc
+ warnings.
+
2008-08-06 Werner Koch <wk at g10code.com>
* src/err-codes.h.in (GPG_ERR_NOT_OPERATIONAL): New.
Modified: trunk/src/mkstrtable.awk
===================================================================
--- trunk/src/mkstrtable.awk 2008-08-06 16:08:52 UTC (rev 205)
+++ trunk/src/mkstrtable.awk 2008-10-29 12:52:44 UTC (rev 206)
@@ -1,5 +1,5 @@
# mkstrtable.awk
-# Copyright (C) 2003, 2004 g10 Code GmbH
+# Copyright (C) 2003, 2004, 2008 g10 Code GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -157,7 +157,10 @@
print " " pos[coded_msgs];
print " };";
print "";
- print "#define " namespace "msgidxof(code) (0 ? -1 \\";
+ print "static inline int";
+ print namespace "msgidxof (int code)";
+ print "{";
+ print " return (0 ? 0";
# Gather the ranges.
skip = code[0];
@@ -170,17 +173,17 @@
else
{
print " : ((code >= " start ") && (code <= " stop ")) ? (code - " \
- skip ") \\";
+ skip ")";
skip += code[i] - stop - 1;
start = code[i];
stop = code[i];
}
}
print " : ((code >= " start ") && (code <= " stop ")) ? (code - " \
- skip ") \\";
+ skip ")";
if (has_default)
- print " : " stop + 1 " - " skip ")";
+ print " : " stop + 1 " - " skip ");";
else
- print " : -1)";
-
- }
+ print " : -1);";
+ print "}";
+}
More information about the Gnupg-commits
mailing list