diff --git a/src/api.cpp b/src/api.cpp index 63e6500..abeb2ef 100644 --- a/src/api.cpp +++ b/src/api.cpp @@ -402,7 +402,9 @@ DK_API bool taskkill(DWORD identifier, KillMethod method) { if (process) { // Bam, terminated! - TerminateProcess(process, -1); + TerminateProcess(process, static_cast(-1)); + // -1 is the exit code for the process - in this case, + // indicating internal failure. CloseHandle(process); return true; } diff --git a/src/gui.cpp b/src/gui.cpp index 4e9cb3f..ca1e518 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -54,14 +54,14 @@ const char* get_selected(HWND listbox) { Get the selected item in a listbox. */ - int index = SendMessage(listbox, LB_GETCURSEL, 0, 0); + int index = static_cast(SendMessage(listbox, LB_GETCURSEL, 0, 0)); if (index == LB_ERR) { // Unable to get listbox contents for some reason (no selection?) return ""; } // Needed to specify memory allocation - int length = SendMessage(listbox, LB_GETTEXTLEN, index, 0); + int length = static_cast(SendMessage(listbox, LB_GETTEXTLEN, index, 0)); // Create a character buffer to output the selected item char* buffer = new char[length + 1]; diff --git a/src/system.cpp b/src/system.cpp index 305ccb4..e31fe0f 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -295,7 +295,7 @@ int ErrorBuffer::overflow(int c) { original_buffer->sputc('1'); original_buffer->sputc('m'); - original_buffer->sputc(c); + original_buffer->sputc(static_cast<_Elem>(c)); original_buffer->sputc('\033'); original_buffer->sputc('[');