Print this page
12826 update to smatch 0.6.1-rc1-il-6

@@ -13,10 +13,12 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, see http://www.gnu.org/copyleft/gpl.txt
  */
 
+#define _GNU_SOURCE
+
 #include <assert.h>
 #include <ctype.h>
 #include <string.h>
 #include "smatch.h"
 #include "smatch_slist.h"

@@ -205,11 +207,11 @@
 
                 spec->type = FORMAT_TYPE_CHAR;
                 return ++fmt - start;
 
         case 's':
-                if (qualifier)
+                if (qualifier && qualifier != 'l')
                         sm_warning("qualifier '%c' ignored for %%s specifier", qualifier);
 
                 spec->type = FORMAT_TYPE_STR;
                 return ++fmt - start;
 

@@ -670,10 +672,16 @@
         if (!is_ptr_type(type)) {
                 sm_error("%%p expects pointer argument, but argument %d has type '%s'",
                         vaidx, type_to_str(type));
                 return;
         }
+
+        /* error pointers */
+        if (*fmt == 'e')
+                fmt++;
+
+
         /* Just plain %p, nothing to check. */
         if (!isalnum(*fmt))
                 return;
 
         basetype = get_real_base_type(type);