Fixed the rest of the build errors and warnings. Woo! Now for the manifests.
This commit is contained in:
parent
f7867f3427
commit
b8b3b3df39
|
@ -1,4 +1,8 @@
|
|||
// 19 april 2019
|
||||
// TODO get rid of the need for this (it temporarily silences noise so I can find actual build issues)
|
||||
#ifdef _MSC_VER
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -13,6 +13,13 @@ struct defer {
|
|||
struct defer *next;
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Microsoft defines jmp_buf with a __declspec(align()), and for whatever reason, they have a warning that triggers when you use that for any reason, and that warning is enabled with /W4
|
||||
// Silence the warning; it's harmless.
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4324)
|
||||
#endif
|
||||
|
||||
struct testingT {
|
||||
const char *name;
|
||||
void (*f)(testingT *);
|
||||
|
@ -26,6 +33,10 @@ struct testingT {
|
|||
int defersRun;
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
static void initTest(testingT *t, const char *name, void (*f)(testingT *), const char *file, long line)
|
||||
{
|
||||
t->name = name;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#define testingprivMkCtor(basename, regfunc) \
|
||||
__attribute__((constructor)) static void testingprivCtorName(basename)(void) { regfunc(#basename, testingprivScaffoldName(basename), __FILE__, __LINE__); }
|
||||
#elif defined(_MSC_VER)
|
||||
#define testingprivMkCtor(basename, reg) \
|
||||
#define testingprivMkCtor(basename, regfunc) \
|
||||
static int testingprivCtorName(basename)(void) { regfunc(#basename, testingprivScaffoldName(basename), __FILE__, __LINE__); return 0; } \
|
||||
__pragma(section(".CRT$XCU",read)) \
|
||||
__declspec(allocate(".CRT$XCU")) static int (*testingprivCtorPtrName(basename))(void) = testingprivCtorName(basename);
|
||||
|
|
Loading…
Reference in New Issue