Project

General

Profile

Actions

Bug #1260

closed

Fix win32.c compiler warnings

Added by cfis (Charlie Savage) over 15 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2009-03-06) [i386-mswin32_90]
Backport:
[ruby-core:22804]

Description

=begin
This patch fixes the majority of compiler warnings for win32.c.

At a minimum I'd recommend the change to include rtcapi.h. I'd also recommend the extra parentheses in:

((1 << ((filename[0] & 0x5f) - 'A')) & GetLogicalDrives()) == 0)) {

To clarify the code (according to operator preference the - happens before the <<.

Thanks,

Charlie


cl -nologo -nologo -MD -RTC1 -Zi -Od -W3 -wd4996 -Od -Zm600 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_90 -I./../include -I./.. -I./../missing -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -I. -I./.. -I./../missing -IC:\Development\msvc\include -DLIBRUBY_SO="ruby19.dll" -Fowin32.obj -c -Tcwin32.c win32.c
win32.c(539) : warning C4013: '_RTC_SetErrorFunc' undefined; assuming extern returning int
win32.c(1599) : warning C4554: '<<' : check operator precedence for possible error; use parentheses to clarify precedence
win32.c(2142) : warning C4018: '<' : signed/unsigned mismatch
win32.c(2148) : warning C4018: '<' : signed/unsigned mismatch
win32.c(2153) : warning C4018: '>=' : signed/unsigned mismatch
win32.c(2176) : warning C4018: '<' : signed/unsigned mismatch
win32.c(2179) : warning C4018: '<' : signed/unsigned mismatch
win32.c(2383) : warning C4018: '>' : signed/unsigned mismatch
win32.c(2384) : warning C4018: '>' : signed/unsigned mismatch
win32.c(2385) : warning C4018: '>' : signed/unsigned mismatch
win32.c(3214) : warning C4018: '>' : signed/unsigned mismatch
win32.c(3260) : warning C4244: '=' : conversion from 'unsigned __int64' to 'long', possible loss of data
win32.c(3720) : warning C4244: '=' : conversion from '__int64' to '_off_t', possible loss of data
win32.c(4619) : warning C4018: '<' : signed/unsigned mismatch
win32.c(4737) : warning C4018: '<' : signed/unsigned mismatch
=end


Files

win32.patch (2.68 KB) win32.patch cfis (Charlie Savage), 03/10/2009 05:01 PM
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 15 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r22879.
=end

Actions

Also available in: Atom PDF

Like0
Like0