diff mbox

[4/4] V2 fix warnings report by selfcheck

Message ID CANeU7QmR-XJ2AiuXKiRgh4Ytf30LDDbYd8_qQoq3qXiPasDawg@mail.gmail.com (mailing list archive)
State Mainlined, archived
Headers show

Commit Message

Christopher Li July 18, 2017, 2:56 a.m. UTC
Signed-off-by: Christopher Li <sparse@chrisli.org>
---
 ast-model.c | 2 +-
 ast-view.c  | 3 ++-
 lib.h       | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

Comments

Ramsay Jones July 18, 2017, 4:37 p.m. UTC | #1
On 18/07/17 03:56, Christopher Li wrote:
> Signed-off-by: Christopher Li <sparse@chrisli.org>
> ---
>  ast-model.c | 2 +-
>  ast-view.c  | 3 ++-
>  lib.h       | 1 +
>  3 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/ast-model.c b/ast-model.c
> index 704c487..63d2762 100644
> --- a/ast-model.c
> +++ b/ast-model.c
> @@ -59,7 +59,7 @@ AstNode* ast_nth_child(AstNode *node, int n)
>   inspect_child_node(node);
> 
>   if (n >= node->childnodes->len)
> - return FALSE;
> + return NULL;
>   return g_array_index(node->childnodes, AstNode *, n);
>  }
> 
> diff --git a/ast-view.c b/ast-view.c
> index c2b3963..22aba11 100644
> --- a/ast-view.c
> +++ b/ast-view.c
> @@ -2,8 +2,9 @@
>  #include <stdlib.h>
>  #include "ast-model.h"
>  #include "ast-inspect.h"
> +#include "ast-view.h"
> 
> -GtkWidget *
> +static GtkWidget *
>  create_view_and_model (void *ptr)
>  {
>   GtkTreeViewColumn   *text;
> diff --git a/lib.h b/lib.h
> index 3f8d361..c90e0e3 100644

I didn't see any warnings related to the above, no doubt
because I don't have libxml and libgtk2 installed (or llvm
on Linux).

I did have the fix below, of course.

ATB,
Ramsay Jones

> --- a/lib.h
> +++ b/lib.h
> @@ -150,6 +150,7 @@ extern int fdump_linearize;
>  extern unsigned long long fmemcpy_max_count;
> 
>  extern int arch_m64;
> +extern int arch_msize_long;
>  extern int arch_big_endian;
> 
>  extern void declare_builtin_functions(void);
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/ast-model.c b/ast-model.c
index 704c487..63d2762 100644
--- a/ast-model.c
+++ b/ast-model.c
@@ -59,7 +59,7 @@  AstNode* ast_nth_child(AstNode *node, int n)
  inspect_child_node(node);

  if (n >= node->childnodes->len)
- return FALSE;
+ return NULL;
  return g_array_index(node->childnodes, AstNode *, n);
 }

diff --git a/ast-view.c b/ast-view.c
index c2b3963..22aba11 100644
--- a/ast-view.c
+++ b/ast-view.c
@@ -2,8 +2,9 @@ 
 #include <stdlib.h>
 #include "ast-model.h"
 #include "ast-inspect.h"
+#include "ast-view.h"

-GtkWidget *
+static GtkWidget *
 create_view_and_model (void *ptr)
 {
  GtkTreeViewColumn   *text;
diff --git a/lib.h b/lib.h
index 3f8d361..c90e0e3 100644
--- a/lib.h
+++ b/lib.h
@@ -150,6 +150,7 @@  extern int fdump_linearize;
 extern unsigned long long fmemcpy_max_count;

 extern int arch_m64;
+extern int arch_msize_long;
 extern int arch_big_endian;

 extern void declare_builtin_functions(void);