pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Windows Compile warnings: C4018 signed/unsigned mismatch and C4723 potential divide by 0
3+ messages / 2 participants
[nested] [flat]

* Windows Compile warnings: C4018 signed/unsigned mismatch and C4723 potential divide by 0
@ 2013-12-15 13:32  ljwilson <ljwilson@digitalav.com>
  0 siblings, 1 reply; 3+ messages in thread

From: ljwilson @ 2013-12-15 13:32 UTC (permalink / raw)
  To: pgsql-odbc

This shouldn't hold-up the impending release, but I thought I should mention
this.

I've always gotten these compiler warnings with VS2012 Express, and just
ignore them. Should we be setting a compile-level switch to surpress them,
or should they be fixed in the code?

Using command: nmake /f win32.mak CFG=Release ALL USE_LIBPQ=yes
With git commit:  d57e87caf0079e9aca8ea0c1ae8f6ea3fa81588b
<http://git.postgresql.org/gitweb/?p=psqlodbc.git;a=commit;h=d57e87caf0079e9aca8ea0c1ae8f6ea3fa81588b;  

bind.c(940) : warning C4018: '<' : signed/unsigned mismatch
convert.c(474) : warning C4018: '>' : signed/unsigned mismatch
convert.c(1417) : warning C4018: '<=' : signed/unsigned mismatch
convert.c(1459) : warning C4018: '<' : signed/unsigned mismatch
convert.c(2670) : warning C4018: '<' : signed/unsigned mismatch
convert.c(2701) : warning C4018: '<' : signed/unsigned mismatch
convert.c(2752) : warning C4018: '<' : signed/unsigned mismatch
convert.c(3047) : warning C4018: '<' : signed/unsigned mismatch
convert.c(3413) : warning C4018: '<' : signed/unsigned mismatch
convert.c(4135) : warning C4018: '>=' : signed/unsigned mismatch
convert.c(4844) : warning C4018: '<' : signed/unsigned mismatch
dlg_specific.c(1476) : warning C4018: '<' : signed/unsigned mismatch
dlg_specific.c(1481) : warning C4018: '>=' : signed/unsigned mismatch
dlg_specific.c(1490) : warning C4018: '>=' : signed/unsigned mismatch
execute.c(1390) : warning C4018: '>=' : signed/unsigned mismatch
info.c(803) : warning C4018: '>=' : signed/unsigned mismatch
parse.c(306) : warning C4018: '<' : signed/unsigned mismatch
parse.c(505) : warning C4018: '<=' : signed/unsigned mismatch
parse.c(1125) : warning C4018: '<' : signed/unsigned mismatch
parse.c(1139) : warning C4018: '>=' : signed/unsigned mismatch
parse.c(1153) : warning C4018: '<' : signed/unsigned mismatch
parse.c(1500) : warning C4018: '>=' : signed/unsigned mismatch
pgtypes.c(1488) : warning C4018: '<' : signed/unsigned mismatch

c:\psqlodbc\convert.c(692) : warning C4723: potential divide by 0

qresult.c(936) : warning C4018: '>' : signed/unsigned mismatch
results.c(565) : warning C4018: '<' : signed/unsigned mismatch
results.c(625) : warning C4018: '<' : signed/unsigned mismatch
results.c(878) : warning C4018: '>=' : signed/unsigned mismatch
results.c(1338) : warning C4018: '<=' : signed/unsigned mismatch
results.c(1353) : warning C4018: '<=' : signed/unsigned mismatch
results.c(1768) : warning C4018: '>' : signed/unsigned mismatch
results.c(1806) : warning C4018: '<' : signed/unsigned mismatch
results.c(2189) : warning C4018: '>=' : signed/unsigned mismatch
results.c(2325) : warning C4018: '>=' : signed/unsigned mismatch
results.c(2429) : warning C4018: '>=' : signed/unsigned mismatch
results.c(2539) : warning C4018: '>=' : signed/unsigned mismatch
results.c(2647) : warning C4018: '<' : signed/unsigned mismatch
results.c(2784) : warning C4018: '<' : signed/unsigned mismatch
results.c(2800) : warning C4018: '<' : signed/unsigned mismatch
results.c(2824) : warning C4018: '<' : signed/unsigned mismatch
results.c(2965) : warning C4018: '>=' : signed/unsigned mismatch
results.c(2972) : warning C4018: '>=' : signed/unsigned mismatch
results.c(3110) : warning C4018: '<' : signed/unsigned mismatch
results.c(3286) : warning C4018: '>' : signed/unsigned mismatch
results.c(3297) : warning C4018: '>' : signed/unsigned mismatch
results.c(3308) : warning C4018: '>' : signed/unsigned mismatch
results.c(3408) : warning C4018: '<' : signed/unsigned mismatch
results.c(3433) : warning C4018: '>=' : signed/unsigned mismatch
results.c(3553) : warning C4018: '>=' : signed/unsigned mismatch
results.c(3629) : warning C4018: '>=' : signed/unsigned mismatch
results.c(3796) : warning C4018: '>=' : signed/unsigned mismatch
results.c(4019) : warning C4018: '<' : signed/unsigned mismatch
results.c(4213) : warning C4018: '<' : signed/unsigned mismatch
results.c(4308) : warning C4018: '>=' : signed/unsigned mismatch
results.c(4563) : warning C4018: '>=' : signed/unsigned mismatch
statement.c(1704) : warning C4018: '<' : signed/unsigned mismatch
odbcapi30w.c(186) : warning C4018: '>=' : signed/unsigned mismatch
odbcapi30w.c(311) : warning C4018: '>=' : signed/unsigned mismatch
odbcapi30w.c(382) : warning C4018: '>=' : signed/unsigned mismatch

Thanks...jack



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Windows-Compile-warnings-C4018-signed-unsigned-mismatch-and-...
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Windows Compile warnings: C4018 signed/unsigned mismatch and C4723 potential divide by 0
@ 2013-12-16 03:34  Inoue, Hiroshi <inoue@tpf.co.jp>
  parent: ljwilson <ljwilson@digitalav.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Inoue, Hiroshi @ 2013-12-16 03:34 UTC (permalink / raw)
  To: ljwilson <ljwilson@digitalav.com>; pgsql-odbc

(2013/12/15 22:32), ljwilson wrote:
> This shouldn't hold-up the impending release, but I thought I should mention
> this.
>
> I've always gotten these compiler warnings with VS2012 Express, and just
> ignore them. Should we be setting a compile-level switch to surpress them,
> or should they be fixed in the code?

OK I pushed the change
     Suppress Windows Compile warnings: C4018 signed/unsigned mismatch
	by default.

You can change some CL options using CUSTOMCLOPT macro.

As for the C4723 warning, I didn't suppress them because I can verify
  the intentional 0-divide using the warnings.

regards,
Hiroshi Inoue

-- 
I am using the free version of SPAMfighter.
SPAMfighter has removed 1246 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan 
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen



-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Windows Compile warnings: C4018 signed/unsigned mismatch and C4723 potential divide by 0
@ 2013-12-16 13:03  ljwilson <ljwilson@digitalav.com>
  parent: Inoue, Hiroshi <inoue@tpf.co.jp>
  0 siblings, 0 replies; 3+ messages in thread

From: ljwilson @ 2013-12-16 13:03 UTC (permalink / raw)
  To: pgsql-odbc

Thanks! Much cleaner now when compiling.

...jack



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Windows-Compile-warnings-C4018-signed-unsigned-mismatch-and-...
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2013-12-16 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-12-15 13:32 Windows Compile warnings: C4018 signed/unsigned mismatch and C4723 potential divide by 0 ljwilson <ljwilson@digitalav.com>
2013-12-16 03:34 ` Inoue, Hiroshi <inoue@tpf.co.jp>
2013-12-16 13:03   ` ljwilson <ljwilson@digitalav.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox