lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 06/08/14 10:54, T Poojita wrote:
> Thank you for your reply.
> I have a small doubt regarding the connectivity to db2.
> When I try to "make" the luasql.odbc file, the make file compiles with
> the following warnings
> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -ansi
> -pedantic -fPIC -DUNIXODBC -I/usr/local/include -I/usr/local/include
> -DLUASQL_VERSION_NUMBER='"2.3.0"'    -c -o src/luasql.o src/luasql.c
> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -ansi
> -pedantic -fPIC -DUNIXODBC -I/usr/local/include -I/usr/local/include
> -DLUASQL_VERSION_NUMBER='"2.3.0"'    -c -o src/ls_odbc.o src/ls_odbc.c
> src/ls_odbc.c: In function âfailâ:
> src/ls_odbc.c:132: warning: pointer targets in passing argument 6 of
> âSQLGetDiagRecâ differ in signedness
> /usr/include/sql.h:711: note: expected âSQLCHAR *â but argument is of
> type âchar *â
> src/ls_odbc.c: In function âcreate_colinfoâ:
> src/ls_odbc.c:382: warning: pointer targets in passing argument 2 of
> âlua_pushstringâ differ in signedness
> Since we got the warnings, we removed the make file by using "make
> clean" command and again performed "make" operation, but the same
> warnings were generated and as a result we are unable to connect with db2.
> We would like to know the reason behind these warnings and the way to
> solve it.
> Kindly share your thoughts.

Most the warnings aren't fatal, just an irritating artefact of 'SQLCHAR'
being defined as 'unsigned char' as opposed to plain 'char' (no idea why
the ODBC spec does that, all it does is cause these problems, the data
is unaffected)

The worst one is:
> src/ls_odbc.c:496: warning: passing argument 2 of âSQLRowCountâ from incompatible pointer type
> /usr/include/sql.h:752: note: expected âSQLLEN *â but argument is of type âSQLINTEGER *â
> src/ls_odbc.c: In function âenv_connectâ:

Which should be changed.

I've opened a couple of tickets: