When cross-building metapad I get this warning:
metapad.c:6181: warning: cast to pointer from integer of different size
metapad.c:6181: warning: cast from pointer to integer of different size
They come from this line (there are a few duplicates of the same kind of warning and same kind of casting):
TCHAR chOption = (TCHAR)CharLower((LPTSTR)szCmdLine);
However, TCHAR is a char string with proper char size depending on being or not unicode, and LPTSTR is a pointer to an array of char strings, with char size depending on unicode being or not defined. This means an element of a LPTSTR MUST have the same pointer size of a TCHAR, since this would actually be an array of TCHARs.
To reproduce, clone this git https://github.com/Oppen/metapad/commits/master and run:
$ make --file=Makefile.custom.linux
You should see the warnings.
MingW32 GCC version is 4.2.1, and MingW32 version is 3.15.2.
Log in to post a comment.