You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2012/08/01 18:41:04 UTC

svn commit: r1368109 - /httpd/httpd/trunk/modules/lua/mod_lua.c

Author: trawick
Date: Wed Aug  1 16:41:04 2012
New Revision: 1368109

URL: http://svn.apache.org/viewvc?rev=1368109&view=rev
Log:
mod_lua.c:189:13: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

Modified:
    httpd/httpd/trunk/modules/lua/mod_lua.c

Modified: httpd/httpd/trunk/modules/lua/mod_lua.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.c?rev=1368109&r1=1368108&r2=1368109&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/mod_lua.c (original)
+++ httpd/httpd/trunk/modules/lua/mod_lua.c Wed Aug  1 16:41:04 2012
@@ -180,13 +180,13 @@ static const char* ap_lua_interpolate_st
     y = 0;
     for (x=0; x < srclen; x++) {
         if (string[x] == '$' && x != srclen-1 && string[x+1] >= '0' && string[x+1] <= '9') {
+            int v = *(string+x+1) - '0';
             if (x-y > 0) {
                 stringBetween = apr_pstrndup(pool, string+y, x-y);
             }
             else {
                 stringBetween = "";
             }
-            int v = *(string+x+1) - '0';
             ret = apr_pstrcat(pool, ret, stringBetween, values[v], NULL);
             y = ++x+1;
         }