]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1194: compiler warning for comparing pointer with int v9.0.1194
authorBram Moolenaar <Bram@vim.org>
Fri, 13 Jan 2023 19:18:38 +0000 (19:18 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 13 Jan 2023 19:18:38 +0000 (19:18 +0000)
Problem:    Compiler warning for comparing pointer with int.
Solution:   Change NULL to zero.

src/version.c
src/vim9class.c

index a4839982fb7da7b1722669bc204f2c746bb50769..65c9e350cff9b9dd81e38df0bd9fe202a7aca9e7 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1194,
 /**/
     1193,
 /**/
index 3169f6220c5826e994dfc7d666d385ead3e5cc86..d66fa3ecc4981cb4f35435f8bcf92fca818958a6 100644 (file)
@@ -717,7 +717,7 @@ early_ret:
                    {
                        // For a "new()" function "this.member" arguments are
                        // OK.  TODO: check for the "this." prefix.
-                       if (STRNCMP(uf->uf_name, "new", 3) == NULL && il == 2)
+                       if (STRNCMP(uf->uf_name, "new", 3) == 0 && il == 2)
                            continue;
                        garray_T *mgap = il == 1 ? &classmembers : &objmembers;
                        for (int mi = 0; mi < mgap->ga_len; ++mi)