File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ win32_compute_revents (HANDLE h, int *p_sought)
149
149
case FILE_TYPE_PIPE :
150
150
if (!once_only )
151
151
{
152
- NtQueryInformationFile = (PNtQueryInformationFile )
152
+ NtQueryInformationFile = (PNtQueryInformationFile )( void ( * )( void ))
153
153
GetProcAddress (GetModuleHandleW (L"ntdll.dll" ),
154
154
"NtQueryInformationFile" );
155
155
once_only = TRUE;
Original file line number Diff line number Diff line change 38
38
#include "compat/obstack.h"
39
39
40
40
#define NCHAR (UCHAR_MAX + 1)
41
- #define obstack_chunk_alloc xmalloc
41
+ /* adapter for `xmalloc()`, which takes `size_t`, not `long` */
42
+ static void * obstack_chunk_alloc (long size )
43
+ {
44
+ if (size < 0 )
45
+ BUG ("Cannot allocate a negative amount: %ld" , size );
46
+ return xmalloc (size );
47
+ }
42
48
#define obstack_chunk_free free
43
49
44
50
#define U (c ) ((unsigned char) (c))
You can’t perform that action at this time.
0 commit comments