Merge pull request #350 from woolcoxm/fix/build-warnings-dev

fix(warnings): silence two -Wall/-Wextra warnings on the MinGW build
This commit is contained in:
Vincenzo
2026-07-17 20:42:25 +02:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -244,7 +244,9 @@ static inline int compat_rename(const char *old, const char *new){
/* --- rss_gb: getrusage -> GetProcessMemoryInfo ---
* ru_maxrss in KB (come Linux): rss_gb() divide per 1e6 → GB corretti. */
#include <psapi.h>
#pragma comment(lib, "psapi.lib")
#ifdef _MSC_VER
#pragma comment(lib, "psapi.lib") /* MSVC: link psapi; MinGW/GCC uses -lpsapi */
#endif
struct rusage { long ru_maxrss; };
#define RUSAGE_SELF 0
static inline int getrusage(int who, struct rusage *r){