Browse Source

Fix warning about missing const qualifier

Fixes this:

In file included from libc/misc/fnmatch/fnmatch.c:235:0:
libc/misc/fnmatch/fnmatch_loop.c: In function 'internal_fnmatch':
libc/misc/fnmatch/fnmatch_loop.c:207:21: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      CHAR *p_init = p;
                     ^
libc/misc/fnmatch/fnmatch_loop.c:208:21: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      CHAR *n_init = n;

Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
Yann Sionneau 3 years ago
parent
commit
9f54321e2e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libc/misc/fnmatch/fnmatch_loop.c

+ 2 - 2
libc/misc/fnmatch/fnmatch_loop.c

@@ -204,8 +204,8 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
 	case L('['):
 	  {
 	    /* Nonzero if the sense of the character class is inverted.  */
-	    CHAR *p_init = p;
-	    CHAR *n_init = n;
+	    const CHAR *p_init = p;
+	    const CHAR *n_init = n;
 	    register int not;
 	    CHAR cold;
 	    UCHAR fn;