From 03d9db8d5ff22faa27ab25264727bb09ba87d66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 18 Jul 2022 03:14:39 +0200 Subject: Solve compiler warnings. --- Makefile | 2 +- c/common.cpp | 4 ++-- c/common.h | 2 +- c/main.cpp | 2 +- c/pl.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 2ba9297..1794dab 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PL = pl/cfg.pl pl/episode_data.pl pl/local_episodes.pl pl/track_episodes.pl CL = swipl-ld CLFLAGS = -DUNICODE -D_UNICODE -CLFLAGS += -cc-options,-std=c++17 -Wall -Wpedantic -O2 +CLFLAGS += -cc-options,-std=c++17 -Wall -Wextra -Wpedantic -O2 CLFLAGS += -ld-options,-mwindows -lcomctl32 -luxtheme all: showdeps b/$(EXE) diff --git a/c/common.cpp b/c/common.cpp index a5b7316..c04d986 100644 --- a/c/common.cpp +++ b/c/common.cpp @@ -58,7 +58,7 @@ Library::~Library() FreeLibrary(m_hModule); } -FARPROC Library::GetProcAddress(const char* const szProc) +void* Library::GetProcAddress(const char* const szProc) { - return ::GetProcAddress(m_hModule, szProc); + return (void*)::GetProcAddress(m_hModule, szProc); } diff --git a/c/common.h b/c/common.h index 2b3c331..169b748 100644 --- a/c/common.h +++ b/c/common.h @@ -27,7 +27,7 @@ struct Library { Library(const TCHAR* tszLibrary); ~Library(); - FARPROC GetProcAddress(const char* szProc); + void* GetProcAddress(const char* szProc); private: HMODULE m_hModule; }; diff --git a/c/main.cpp b/c/main.cpp index 4b42317..2e2fbbf 100644 --- a/c/main.cpp +++ b/c/main.cpp @@ -474,7 +474,7 @@ LRESULT CALLBACK WndProc(const HWND hWnd, const UINT uMsg, const WPARAM wParam, return 0; } -INT_PTR CALLBACK AboutDlgProc(const HWND hWnd, const UINT uMsg, const WPARAM wParam, const LPARAM lParam) +INT_PTR CALLBACK AboutDlgProc(const HWND hWnd, const UINT uMsg, const WPARAM wParam, const LPARAM) { switch (uMsg) { case WM_CLOSE: diff --git a/c/pl.h b/c/pl.h index 276f79a..1ad0967 100644 --- a/c/pl.h +++ b/c/pl.h @@ -57,9 +57,9 @@ int PlGetv(const term_t t, T arg) { return PlGet(t, arg); } template int PlGetv(const term_t t, T arg, R... rest) { return PlGet(t, arg)? PlGetv(t+1, rest...): 0; } template -int Countv(const int i, T arg) { return i+1; } +int Countv(const int i, T) { return i+1; } template -int Countv(const int i, T arg, R... rest) { return Countv(i+1, rest...); } +int Countv(const int i, T, R... rest) { return Countv(i+1, rest...); } /* Call Prolog predicate, propagating Prolog exceptions. */ template -- cgit v1.2.3