Hi all,
  C99 and C++ standards mandate size_t to be unsigned; the attached
patch comments out a branch of code in compat/xstring.cc which tests
for a size_t argument being <0. This is caught by icc as an error.

-- 
    /kinkie
=== modified file 'compat/xstring.cc'
--- compat/xstring.cc	2010-11-01 05:44:28 +0000
+++ compat/xstring.cc	2011-01-08 16:51:30 +0000
@@ -61,6 +61,8 @@
         }
         exit(1);
     }
+#if 0
+		/* dead code: size_t is unsigned on GCC > 2.4 (obsolete) */
     if (n < 0) {
         errno = EINVAL;
         if (failure_notify) {
@@ -70,6 +72,7 @@
         }
         exit(1);
     }
+#endif
 
     sz = strlen(s) + 1;
     if (sz > n)

Reply via email to