Issue #25889: Got rid of warning about mixing signed/unsigned char pointers.
This commit is contained in:
parent
8bc2b4d522
commit
f8ed0044f6
|
@ -1106,7 +1106,7 @@ maybe_handle_shebang(wchar_t ** argv, wchar_t * cmdline)
|
||||||
*/
|
*/
|
||||||
FILE * fp;
|
FILE * fp;
|
||||||
errno_t rc = _wfopen_s(&fp, *argv, L"rb");
|
errno_t rc = _wfopen_s(&fp, *argv, L"rb");
|
||||||
unsigned char buffer[BUFSIZE];
|
char buffer[BUFSIZE];
|
||||||
wchar_t shebang_line[BUFSIZE + 1];
|
wchar_t shebang_line[BUFSIZE + 1];
|
||||||
size_t read;
|
size_t read;
|
||||||
char *p;
|
char *p;
|
||||||
|
@ -1128,7 +1128,8 @@ maybe_handle_shebang(wchar_t ** argv, wchar_t * cmdline)
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
if ((read >= 4) && (buffer[3] == '\n') && (buffer[2] == '\r')) {
|
if ((read >= 4) && (buffer[3] == '\n') && (buffer[2] == '\r')) {
|
||||||
ip = find_by_magic((buffer[1] << 8 | buffer[0]) & 0xFFFF);
|
ip = find_by_magic((((unsigned char)buffer[1]) << 8 |
|
||||||
|
(unsigned char)buffer[0]) & 0xFFFF);
|
||||||
if (ip != NULL) {
|
if (ip != NULL) {
|
||||||
debug(L"script file is compiled against Python %ls\n",
|
debug(L"script file is compiled against Python %ls\n",
|
||||||
ip->version);
|
ip->version);
|
||||||
|
|
Loading…
Reference in New Issue