apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Warnings for apr_dbd_odbc.c on 64-bit platforms
Date Wed, 18 Jun 2008 00:12:32 GMT
I'm getting these on Fedora 9, x86_64:
-----------------------
dbd/apr_dbd_odbc.c: In function ‘odbc_open’:
dbd/apr_dbd_odbc.c:1010: warning: cast to pointer from integer of
different size
dbd/apr_dbd_odbc.c: In function ‘odbc_start_transaction’:
dbd/apr_dbd_odbc.c:1101: warning: cast to pointer from integer of
different size
dbd/apr_dbd_odbc.c: In function ‘odbc_get_entry’:
dbd/apr_dbd_odbc.c:1310: warning: cast from pointer to integer of
different size
dbd/apr_dbd_odbc.c: In function ‘odbc_transaction_mode_set’:
dbd/apr_dbd_odbc.c:1496: warning: cast to pointer from integer of
different size
-----------------------

That's for these lines:
-----------------------
rc = SQLSetConnectAttr(hdbc, attrs[i], (void *) attrvals[i], 0);
...
rc = SQLSetConnectAttr(handle->dbc, SQL_ATTR_TXN_ISOLATION, (void *)
                               handle->transaction_mode, 0);
...
if ((signed int) p > 0)
...
rc = SQLSetConnectAttr(trans->dbc, SQL_ATTR_TXN_ISOLATION,
                           (void *) mode, 0);
-----------------------

Pointers on 64-bit Linux machines are 64-bit values, integers are 32-bit
values, hence the warnings.

Just making sure all this is really intended here...

-- 
Bojan


Mime
View raw message