--------------------- PatchSet 11548 Date: 2007/07/21 21:15:31 Author: hno Branch: SQUID_2_6 Tag: (none) Log: MFC: Bug #2023: Compile error with old GCC 2.x or other ANSI-C compilers before C99 The C standard before C99 requires all variables to be declared at the begining of a block, not between statements.. The problem was introduced by the "Deal better with forwarding loops" patch (2.6.STABLE14). Merged changes: 2007/07/20 21:20:49 hno +3 -2 Bug #2023: Compile error with old GCC 2.x or other ANSI-C compilers before C99 Members: src/HttpHeaderTools.c:1.37.2.1->1.37.2.2 Index: squid/src/HttpHeaderTools.c =================================================================== RCS file: /cvsroot/squid/squid/src/HttpHeaderTools.c,v retrieving revision 1.37.2.1 retrieving revision 1.37.2.2 diff -u -r1.37.2.1 -r1.37.2.2 --- squid/src/HttpHeaderTools.c 15 Jul 2007 09:52:17 -0000 1.37.2.1 +++ squid/src/HttpHeaderTools.c 21 Jul 2007 21:15:31 -0000 1.37.2.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeaderTools.c,v 1.37.2.1 2007/07/15 09:52:17 hno Exp $ + * $Id: HttpHeaderTools.c,v 1.37.2.2 2007/07/21 21:15:31 hno Exp $ * * DEBUG: section 66 HTTP Header Tools * AUTHOR: Alex Rousskov @@ -194,8 +194,9 @@ int strIsSubstr(const String * list, const char *s) { + const char *p; assert(list && s); - const char *p = strStr(*list, s); + p = strStr(*list, s); if (!p) return 0; if (strstr(p + 1, s) != NULL)