mirror of
https://github.com/git/git.git
synced 2026-01-10 01:56:42 +00:00
Merge branch 'js/gcc-8-and-9'
Code clean-up for new compilers. * js/gcc-8-and-9: config: avoid calling `labs()` on too-large data type winansi: simplify loading the GetCurrentConsoleFontEx() function kwset: allow building with GCC 8 poll (mingw): allow compiling with GCC 8 and DEVELOPER=1
This commit is contained in:
8
kwset.c
8
kwset.c
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user