I'm trying to use Splint with a short CGI script, but get this error:
Null storage passed as non-null param: mysql_init(NULL)
mysql_init
is defined to return a new value if it's param is NULL
, or store the result in the param if it's not. Yet, if I try
MYSQL* connection;
mysql_init(connection);
I will get:
Variable connection used before definition
How to resolve this? One way would of course be to annotate mysql.h
so Splint won't complain. Is the my only solution?