From 4d0848b3e879789b523a98fe16ef134556641ca0 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 10 Jun 2014 18:12:38 +0400 Subject: [PATCH] fix -Wmaybe-uninitialized warning (initialize pointers to NULL) --- modules/python/src2/gen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/python/src2/gen.py b/modules/python/src2/gen.py index 40879e569f..d43a8023f2 100755 --- a/modules/python/src2/gen.py +++ b/modules/python/src2/gen.py @@ -153,6 +153,8 @@ def gen(name, args, ty, flags): ctype = remap.get(a.ty, a.ty) if a.init: init = " = %s" % a.init + elif ctype[-1] == '*': + init = ' = NULL' else: init = '' yield " %s %s%s;" % (ctype, a.nm, init)