apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Johnson" <...@nrtc.northrop.com>
Subject RE: win32 DWORD and right shift of 32
Date Tue, 28 Jun 2005 16:07:35 GMT
apr_file_t.filePtr is of type apr_off_t. On Win32, this is typically an
int, so shifting it right 32 bits really does zero it.

Dan

Daniel M. Johnson Software Engineer | One Hornet Way, MS 9M52/W6
Northrop Grumman Integrated Systems | El Segundo, CA 90245-2804
J-UCAS Vehicle Management Systems | Telephone: (310) 345-5253


-----Original Message-----
From: John Vandenberg [mailto:jayvdb@gmail.com] 
Sent: Monday, June 27, 2005 9:09 PM
To: dev@apr.apache.org
Subject: win32 DWORD and right shift of 32

Hi,

One of the warnings MinGW emits is a bit curious.

/apr/include  -o file_io/win32/readwrite.lo -c
file_io/win32/readwrite.c && touch file_io/win32/readwrite.lo
file_io/win32/readwrite.c: In function `read_with_timeout':
file_io/win32/readwrite.c:70: warning: right shift count >= width of
type
file_io/win32/readwrite.c: In function `apr_file_write':
file_io/win32/readwrite.c:245: warning: right shift count >= width of
type
file_io/win32/readwrite.c:290: warning: right shift count >= width of
type
/bin/sh /libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H 
  -I./include -I/d/workpits/apr/include/arch/win32
-I./include/arch/unix -I/d/workpits/apr/include  -o
file_io/win32/seek.lo -c file_io/win32/seek.c && touch
file_io/win32/seek.lo
file_io/win32/seek.c: In function `setptr':
file_io/win32/seek.c:40: warning: right shift count >= width of type
file_io/win32/seek.c: In function `apr_file_seek':
file_io/win32/seek.c:117: warning: right shift count >= width of type
file_io/win32/seek.c:137: warning: left shift count >= width of type
file_io/win32/seek.c: In function `apr_file_trunc':
file_io/win32/seek.c:147: warning: right shift count >= width of type

Is this a general Win32 problem, or is a DWORD in MSVC land 33 bits ?

Cheers,
John


Mime
View raw message