瀏覽代碼

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 4 年之前
父節點
當前提交
9f54321e2e
共有 1 個文件被更改,包括 2 次插入2 次删除
  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;