fix -Wmaybe-uninitialized warning (initialize pointers to NULL)

pull/2846/head
Alexander Alekhin 11 years ago
parent 1f4ddbe5b6
commit 4d0848b3e8
  1. 2
      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)

Loading…
Cancel
Save