From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Warnings when compiling code with nmake on Windows (x64) |
Date: | 2014-05-19 13:00:30 |
Message-ID: | CAB7nPqQAbnmB9WmqzF22HTSkW5rRZaPLuOQ9LGfKFYw=-7JAMw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hi all,
When compiling the code using nmake on Windows, I am seeing a bunch of warnings:
connection.c(3211) : warning C4267: 'function' : conversion from 'size_t' to 'in
t', possible loss of data
connection.c(3241) : warning C4267: 'function' : conversion from 'size_t' to 'in
t', possible loss of data
convert.c
convert.c(1180) : warning C4244: 'function' : conversion from 'SQLLEN' to 'int',
possible loss of data
convert.c(3186) : warning C4244: '=' : conversion from '__int64' to 'int', possi
ble loss of data
convert.c(3233) : warning C4244: '=' : conversion from '__int64' to 'int', possi
ble loss of data
convert.c(3244) : warning C4244: '=' : conversion from '__int64' to 'int', possi
ble loss of data
convert.c(3253) : warning C4244: '=' : conversion from '__int64' to 'int', possi
ble loss of data
convert.c(3690) : warning C4267: '=' : conversion from 'size_t' to 'unsigned int
', possible loss of data
convert.c(4055) : warning C4267: '=' : conversion from 'size_t' to 'int', possib
le loss of data
convert.c(4067) : warning C4267: '=' : conversion from 'size_t' to 'int', possib
le loss of data
convert.c(4163) : warning C4267: '=' : conversion from 'size_t' to 'int', possib
le loss of data
info.c(1504) : warning C4267: '=' : conversion from 'size_t' to 'SQLSMALLINT', p
ossible loss of data
parse.c(144) : warning C4244: '=' : conversion from '__int64' to 'int', possible
loss of data
parse.c(1342) : warning C4244: '=' : conversion from '__int64' to 'int', possibl
e loss of data
parse.c(1361) : warning C4244: '=' : conversion from '__int64' to 'int', possibl
e loss of data
pgtypes.c
pgtypes.c(1493) : warning C4267: '=' : conversion from 'size_t' to 'int', possib
le loss of data
Generating Code...
c:\users\mpaquier\git\pgodbc\convert.c(692) : warning C4723: potential
divide by 0
setup.c(393) : warning C4267: '=' : conversion from 'size_t' to 'int', possible
loss of data
setup.c(490) : warning C4244: '=' : conversion from '__int64' to 'int', possible
loss of data
socket.c
statement.c
statement.c(1045) : warning C4244: '=' : conversion from '__int64' to 'int', pos
sible loss of data
statement.c(2869) : warning C4267: '=' : conversion from 'size_t' to 'int', poss
ible loss of data
The attached patch is a tentative to fix them, except the division by
0 in convert.c I was not really sure how to fix the division by 0
case... This work has been done on a Win7 box using Visual 10 and SDK
7.1. Most of those warnings are caused by difference of 64b pointers
with results casted back to int4.
Comments welcome.
--
Michael
Attachment | Content-Type | Size |
---|---|---|
20140519_pgodbc_win_warnings.patch | text/plain | 8.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Blake Pusztai | 2014-05-19 21:10:09 | Re: [ANNOUNCE] psqlODBC 09.03.0300 Released |
Previous Message | Michael Paquier | 2014-05-19 11:31:44 | Re: Ignoring folders generated by Windows builds |