Fixed build warnings and errors. Now we just need to implement testingRunWithTimeout() on Windows.

This commit is contained in:
Pietro Gagliardi 2019-04-28 16:35:25 -04:00
parent 5548119d8d
commit 8ffb2b1b1e
3 changed files with 14 additions and 6 deletions

View File

@ -328,7 +328,15 @@ char *testingNsecString(int64_t nsec)
unsec = (uint64_t) nsec;
neg = 0;
if (nsec < 0) {
#ifdef _MSC_VER
// TODO figure out a more explicit way to do this; until then, just go with what the standard says should happen, because it's what we want (TODO verify this)
#pragma warning(push)
#pragma warning(disable: 4146)
#endif
unsec = -unsec;
#ifdef _MSC_VER
#pragma warning(pop)
#endif
neg = 1;
}

View File

@ -42,8 +42,8 @@ static inline void setHInstance(void)
ICC_DATE_CLASSES | /* date/time picker */ \
0)
#define errGetDefaultIconFailed "failed to load default icon"
#define errGetDefaultCursorFailed "failed to load default cursor"
#define errLoadDefaultIconFailed "failed to load default icon"
#define errLoadDefaultCursorFailed "failed to load default cursor"
#define errInitUtilWindowFailed "failed to initialize the utility window"
#define errICCFailed "InitCommonControlsEx() failed"
#define errICCFailedNoLastError "InitCommonControlsEx() failed, but didn't specify why. This usually means you forgot the Common Controls v6 manifest; refer to the libui documentation for instructions."
@ -51,8 +51,8 @@ static inline void setHInstance(void)
#define errHRESULTInitErrorsSuffix ": 0x00000000"
static const char *initErrors[] = {
errGetDefaultIconFailed errHRESULTInitErrorsSuffix
errGetDefaultCursorFailed errHRESULTInitErrorsSuffix
errLoadDefaultIconFailed errHRESULTInitErrorsSuffix
errLoadDefaultCursorFailed errHRESULTInitErrorsSuffix
errInitUtilWindowFailed errHRESULTInitErrorsSuffix
errICCFailed errHRESULTInitErrorsSuffix,
errICCFailedNoLastError,

View File

@ -29,7 +29,7 @@ HRESULT uiprivInitUtilWindow(HICON hDefaultIcon, HCURSOR hDefaultCursor)
ZeroMemory(&wc, sizeof (WNDCLASSW));
wc.lpszClassName = utilWindowClass;
wc.lpfnWndProc = utilWindowWndProc;
wc.hInstance = hInstance;
wc.hInstance = uipriv_hInstance;
wc.hIcon = hDefaultIcon;
wc.hCursor = hDefaultCursor;
wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
@ -40,6 +40,6 @@ HRESULT uiprivInitUtilWindow(HICON hDefaultIcon, HCURSOR hDefaultCursor)
utilWindowClass, L"libui utility window",
WS_OVERLAPPEDWINDOW,
0, 0, 100, 100,
NULL, NULL, hInstance, NULL,
NULL, NULL, uipriv_hInstance, NULL,
&uiprivUtilWindow);
}