Skip to content

Make Git for Windows compile with GCC 8.x #2149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compat/poll/poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ win32_compute_revents (HANDLE h, int *p_sought)
case FILE_TYPE_PIPE:
if (!once_only)
{
NtQueryInformationFile = (PNtQueryInformationFile)
NtQueryInformationFile = (PNtQueryInformationFile)(void *)
GetProcAddress (GetModuleHandleA ("ntdll.dll"),
"NtQueryInformationFile");
once_only = TRUE;
Expand Down
2 changes: 1 addition & 1 deletion compat/win32/exit-process.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static int exit_process(HANDLE process, int exit_code)
HINSTANCE kernel32 = GetModuleHandleA("kernel32");
if (!kernel32)
die("BUG: cannot find kernel32");
exit_process_address = (LPTHREAD_START_ROUTINE)
exit_process_address = (LPTHREAD_START_ROUTINE)(void *)
GetProcAddress(kernel32, "ExitProcess");
initialized = 1;
}
Expand Down
8 changes: 7 additions & 1 deletion kwset.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@
#include "compat/obstack.h"

#define NCHAR (UCHAR_MAX + 1)
#define obstack_chunk_alloc xmalloc
/* adapter for `xmalloc()`, which takes `size_t`, not `long` */
static void *obstack_chunk_alloc(long size)
{
if (size < 0)
BUG("Cannot allocate a negative amount: %ld", size);
return xmalloc(size);
}
#define obstack_chunk_free free

#define U(c) ((unsigned char) (c))
Expand Down