git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GIT 1.5.0-rc2 compiler warning
@ 2007-01-22  1:08 SungHyun Nam
  2007-01-22  1:13 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: SungHyun Nam @ 2007-01-22  1:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT

Hello,

Use CYGWIN.

gcc -o utf8.o -c -O2 -DNO_D_TYPE_IN_DIRENT -DNO_SYMLINK_HEAD
-DNO_FAST_WORKING_DIRECTORY -DNO_IPV6 -DSHA1_HEADER='<openssl/sha.h>'
-DNO_STRCASESTR utf8.c
utf8.c: In function `wcwidth':
utf8.c:148: warning: comparison is always false due to limited range of
data type
utf8.c:148: warning: comparison is always true due to limited range of
data type
utf8.c:149: warning: comparison is always false due to limited range of
data type
utf8.c:149: warning: comparison is always true due to limited range of
data type
utf8.c: In function `reencode_string':
utf8.c:313: warning: passing arg 2 of `libiconv' from incompatible
pointer type


'gcc -E .... utf8.c' gives me:

# 325 "/bin/../lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h" 3 4
typedef short unsigned int wchar_t;


Regards,
namsh

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

* Re: GIT 1.5.0-rc2 compiler warning
  2007-01-22  1:08 GIT 1.5.0-rc2 compiler warning SungHyun Nam
@ 2007-01-22  1:13 ` Junio C Hamano
  2007-01-22 20:44   ` Robin Rosenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2007-01-22  1:13 UTC (permalink / raw)
  To: SungHyun Nam; +Cc: git

I know.  Imported code.

I do not think we can do much on a platform where wchar_t is too
narrow and BMP only anyway.

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

* Re: GIT 1.5.0-rc2 compiler warning
  2007-01-22  1:13 ` Junio C Hamano
@ 2007-01-22 20:44   ` Robin Rosenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Robin Rosenberg @ 2007-01-22 20:44 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: SungHyun Nam, git

måndag 22 januari 2007 02:13 skrev Junio C Hamano:
> I know.  Imported code.
>
> I do not think we can do much on a platform where wchar_t is too
> narrow and BMP only anyway.

What's wrong is the assumption that wchar_t corresponds to a complete unicode 
character. On windows, two wchar_t (code units) may me combined to encode a
unicode character outside of the BMP.

Without investigating further, I note that Java adds methods with an 'int' 
argument to the Character utility class to handle code points, vs the 
original 'char' that represents a code unit. (unlike C, an int is always 
32-bit in Java).

-- robin
 

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

end of thread, other threads:[~2007-01-22 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-22  1:08 GIT 1.5.0-rc2 compiler warning SungHyun Nam
2007-01-22  1:13 ` Junio C Hamano
2007-01-22 20:44   ` Robin Rosenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).