[grilo] Fix compilation with gcc 4.2



commit 87a9dda4c5dfcfcf1c533672e342666faaa0c7d5
Author: Jasper Lievisse Adriaanse <jasper humppa nl>
Date:   Thu Nov 8 19:45:44 2012 +0100

    Fix compilation with gcc 4.2
    
    grl-net-mock.c: In function 'init_mock_requester':
    grl-net-mock.c:206: error: 'for' loop initial declaration used outside C99 mode

 libs/net/grl-net-mock.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libs/net/grl-net-mock.c b/libs/net/grl-net-mock.c
index e2fad15..9247e34 100644
--- a/libs/net/grl-net-mock.c
+++ b/libs/net/grl-net-mock.c
@@ -153,6 +153,7 @@ void init_mock_requester (GrlNetWc *self)
 {
   char *config_filename = g_strdup (g_getenv (GRL_NET_MOCKED_VAR));
   enable_mocking = FALSE;
+  int i;
 
   if (config_filename == NULL) {
     return;
@@ -203,7 +204,7 @@ void init_mock_requester (GrlNetWc *self)
     } else {
       g_string_append (pattern, "(?:");
 
-      for (int i = 0; parameter_names[i]; ++i) {
+      for (i = 0; parameter_names[i]; ++i) {
         if (i)
           g_string_append (pattern, "|");
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]