Blob Blame Raw
diff -up pkg-config-0.24/parse.c.popt-compat pkg-config-0.24/parse.c
--- pkg-config-0.24/parse.c.popt-compat	2010-05-27 10:39:25.541590283 -0400
+++ pkg-config-0.24/parse.c	2010-05-27 10:50:39.351362109 -0400
@@ -735,7 +735,7 @@ parse_libs (Package *pkg, const char *st
   
   char *trimmed;
   char **argv = NULL;
-  int argc;
+  int argc = 0;
   int result;
   
   if (pkg->libs_num > 0)
@@ -749,10 +749,10 @@ parse_libs (Package *pkg, const char *st
 
   result = poptParseArgvString (trimmed, &argc, &argv);
 
-  if (result < 0)
+  if (result < 0 && result != POPT_ERROR_NOARG)
     {
       verbose_error ("Couldn't parse Libs field into an argument vector: %s\n",
-               poptStrerror (result));
+                     poptStrerror (result));
 
       exit (1);
     }
@@ -781,7 +781,7 @@ parse_libs_private (Package *pkg, const 
   
   char *trimmed;
   char **argv = NULL;
-  int argc;
+  int argc = 0;
   int result;
   
   if (pkg->libs_private_num > 0)
@@ -795,7 +795,7 @@ parse_libs_private (Package *pkg, const 
 
   result = poptParseArgvString (trimmed, &argc, &argv);
 
-  if (result < 0)
+  if (result < 0 && result != POPT_ERROR_NOARG)
     {
       verbose_error ("Couldn't parse Libs.private field into an argument vector: %s\n",
                poptStrerror (result));
@@ -818,7 +818,7 @@ parse_cflags (Package *pkg, const char *
   
   char *trimmed;
   char **argv = NULL;
-  int argc;
+  int argc = 0;
   int result;
   int i;
   
@@ -833,7 +833,7 @@ parse_cflags (Package *pkg, const char *
 
   result = poptParseArgvString (trimmed, &argc, &argv);
 
-  if (result < 0)
+  if (result < 0 && result != POPT_ERROR_NOARG)
     {
       verbose_error ("Couldn't parse Cflags field into an argument vector: %s\n",
                      poptStrerror (result));