pllua / pllua-deprecated

[DEPRECATED] This repository is no longer maintained. Please follow https://github.com/pllua/pllua
197 stars 16 forks source link

warnings : may be used uninitialized in this function #10

Closed golgote closed 8 years ago

golgote commented 8 years ago

Got these warnings while compiling last merge:

plluaspi.c: In function ‘luaP_execute’: plluaspi.c:961: attention : ‘result’ may be used uninitialized in this function plluaspi.c: In function ‘luaP_executeplan’: plluaspi.c:796: attention : ‘result’ may be used uninitialized in this function plluaspi.c: In function ‘luaP_getcursorplan’: plluaspi.c:853: attention : ‘cursor’ may be used uninitialized in this function plluaspi.c: In function ‘luaP_rowsplan’: plluaspi.c:878: attention : ‘cursor’ may be used uninitialized in this function

Removing macro PLLUA_PG_CATCH_RETHROW is an easy way to fix them.

Got this one as well: pllua_pgfunc.c: In function ‘get_pgfunc’: pllua_pgfunc.c:214: attention : ‘reg_name’ may be used uninitialized in this function

eugwne commented 8 years ago

PLLUA_PG_CATCH_RETHROW should protect from crashes after using code like server.execute("abracadabra")