{"thread":{"id":"6465","subject":"GIT 1.5.0-rc2 compiler warning","startedAt":"2007-01-22T01:08:14Z","lastAt":"2007-01-22T20:44:34Z","messageCount":3,"participants":["SungHyun Nam","Junio C Hamano","Robin Rosenberg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"32256","messageId":"45B40E7E.3030706@gmail.com","threadId":"6465","inReplyTo":null,"subject":"GIT 1.5.0-rc2 compiler warning","fromName":"SungHyun Nam","fromEmail":"goweol@gmail.com","sentAt":"2007-01-22T01:08:14Z","receivedAt":"2007-01-22T01:08:14Z","isPatch":false,"sender":{"key":"goweol@gmail.com","avatar":null},"body":"Hello,\n\nUse CYGWIN.\n\ngcc -o utf8.o -c -O2 -DNO_D_TYPE_IN_DIRENT -DNO_SYMLINK_HEAD\n-DNO_FAST_WORKING_DIRECTORY -DNO_IPV6 -DSHA1_HEADER='<openssl/sha.h>'\n-DNO_STRCASESTR utf8.c\nutf8.c: In function `wcwidth':\nutf8.c:148: warning: comparison is always false due to limited range of\ndata type\nutf8.c:148: warning: comparison is always true due to limited range of\ndata type\nutf8.c:149: warning: comparison is always false due to limited range of\ndata type\nutf8.c:149: warning: comparison is always true due to limited range of\ndata type\nutf8.c: In function `reencode_string':\nutf8.c:313: warning: passing arg 2 of `libiconv' from incompatible\npointer type\n\n\n'gcc -E .... utf8.c' gives me:\n\n# 325 \"/bin/../lib/gcc/i686-pc-cygwin/3.4.4/include/stddef.h\" 3 4\ntypedef short unsigned int wchar_t;\n\n\nRegards,\nnamsh\n"},{"id":"32258","messageId":"7vy7nvyic4.fsf@assigned-by-dhcp.cox.net","threadId":"6465","inReplyTo":"45B40E7E.3030706@gmail.com","subject":"Re: GIT 1.5.0-rc2 compiler warning","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-22T01:13:15Z","receivedAt":"2007-01-22T01:13:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I know.  Imported code.\n\nI do not think we can do much on a platform where wchar_t is too\nnarrow and BMP only anyway.\n"},{"id":"32330","messageId":"200701222144.34934.robin.rosenberg.lists@dewire.com","threadId":"6465","inReplyTo":"7vy7nvyic4.fsf@assigned-by-dhcp.cox.net","subject":"Re: GIT 1.5.0-rc2 compiler warning","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2007-01-22T20:44:34Z","receivedAt":"2007-01-22T20:44:34Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"måndag 22 januari 2007 02:13 skrev Junio C Hamano:\n> I know.  Imported code.\n>\n> I do not think we can do much on a platform where wchar_t is too\n> narrow and BMP only anyway.\n\nWhat's wrong is the assumption that wchar_t corresponds to a complete unicode \ncharacter. On windows, two wchar_t (code units) may me combined to encode a\nunicode character outside of the BMP.\n\nWithout investigating further, I note that Java adds methods with an 'int' \nargument to the Character utility class to handle code points, vs the \noriginal 'char' that represents a code unit. (unlike C, an int is always \n32-bit in Java).\n\n-- robin\n \n"}]}