Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Sep 7, 2024
1 parent 02c8080 commit 614e340
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion inc/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void dbg_dump_dds_lock_flags(DWORD flags);
char* dbg_d3d9_hr_to_str(HRESULT hr);
char* dbg_mes_to_str(int id);

__declspec(noreturn) void __cdecl dbg_invoke_watson(
void __cdecl dbg_invoke_watson(
_In_opt_z_ wchar_t const*,
_In_opt_z_ wchar_t const*,
_In_opt_z_ wchar_t const*,
Expand Down
8 changes: 1 addition & 7 deletions src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,14 @@ LONG WINAPI dbg_exception_handler(EXCEPTION_POINTERS* exception)
return EXCEPTION_EXECUTE_HANDLER;
}

__declspec(noreturn) void __cdecl dbg_invoke_watson(
void __cdecl dbg_invoke_watson(
wchar_t const* const expression,
wchar_t const* const function_name,
wchar_t const* const file_name,
unsigned int const line_number,
uintptr_t const reserved
)
{
UNREFERENCED_PARAMETER(expression);
UNREFERENCED_PARAMETER(function_name);
UNREFERENCED_PARAMETER(file_name);
UNREFERENCED_PARAMETER(line_number);
UNREFERENCED_PARAMETER(reserved);

TRACE("%s [%p]\n", __FUNCTION__, _ReturnAddress());

/* Force access violation to produce a dmp file for debugging */
Expand Down
6 changes: 4 additions & 2 deletions src/render_d3d9.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#ifdef _DEBUG
#define FAILEDX(stmt) d3d9_check_failed(stmt, #stmt)
#define SUCCEEDEDX(stmt) d3d9_check_succeeded(stmt, #stmt)
static BOOL d3d9_check_failed(HRESULT hr, const char* stmt);
static BOOL d3d9_check_succeeded(HRESULT hr, const char* stmt);
#else
#define FAILEDX(stmt) FAILED(stmt)
#define SUCCEEDEDX(stmt) SUCCEEDED(stmt)
#endif

static BOOL d3d9_check_failed(HRESULT hr, const char* stmt);
static BOOL d3d9_check_succeeded(HRESULT hr, const char* stmt);
static BOOL d3d9_create_resources();
static BOOL d3d9_set_states();
static BOOL d3d9_update_vertices(BOOL upscale_hack, BOOL stretch);
Expand Down Expand Up @@ -173,6 +173,7 @@ BOOL d3d9_create()
return FALSE;
}

#ifdef _DEBUG
static BOOL d3d9_check_failed(HRESULT hr, const char* stmt)
{
if (FAILED(hr))
Expand All @@ -195,6 +196,7 @@ static BOOL d3d9_check_succeeded(HRESULT hr, const char* stmt)

return TRUE;
}
#endif

BOOL d3d9_on_device_lost()
{
Expand Down

0 comments on commit 614e340

Please sign in to comment.