]> granicus.if.org Git - python/commitdiff
Fix compiler warning about non initialised variable (GH-11806)
authorPablo Galindo <Pablogsal@gmail.com>
Sun, 10 Feb 2019 20:37:07 +0000 (20:37 +0000)
committerGitHub <noreply@github.com>
Sun, 10 Feb 2019 20:37:07 +0000 (20:37 +0000)
Python/ast.c

index 4fa98b17f880db1c9ea2e4861a18bd7f4c82319b..76588c345f27ca23515acbd627deba4ca72951e2 100644 (file)
@@ -1366,7 +1366,7 @@ handle_keywordonly_args(struct compiling *c, const node *n, int start,
     PyObject *argname;
     node *ch;
     expr_ty expression, annotation;
-    arg_ty arg;
+    arg_ty arg = NULL;
     int i = start;
     int j = 0; /* index for kwdefaults and kwonlyargs */
 
@@ -1462,7 +1462,7 @@ ast_for_arguments(struct compiling *c, const node *n)
     int nposdefaults = 0, found_default = 0;
     asdl_seq *posargs, *posdefaults, *kwonlyargs, *kwdefaults;
     arg_ty vararg = NULL, kwarg = NULL;
-    arg_ty arg;
+    arg_ty arg = NULL;
     node *ch;
 
     if (TYPE(n) == parameters) {