Fix two Windows cross-compilation errors in analyzer.c

WDSP_FPE_GUARD: the macro is defined only in linux_port.h under
#if defined(linux)||defined(__APPLE__). On the _WIN32 path it was
completely undefined. Added a fallback no-op definition in comm.h
guarded by #ifndef so it applies to Windows (and any future platform
that doesn't include linux_port.h).

volatile int* vs volatile LONG*: Win32 Interlocked functions expect
volatile LONG* (= volatile long*). The dispatcher field is volatile int.
On Windows LLP64 both are 32-bit so the operation is correct, but GCC 14
promotes this mismatch from warning to error. Suppressed with
-Wno-incompatible-pointer-types in Makefile.windows, consistent with
how MSVC handles it silently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Uladzimir Karpenka 2026-06-02 12:54:56 +03:00
parent a77dbbb6e5
commit d997990ceb
2 changed files with 6 additions and 1 deletions

View File

@ -21,7 +21,7 @@ CC := $(MINGW_PREFIX)-gcc
AR := $(MINGW_PREFIX)-ar AR := $(MINGW_PREFIX)-ar
RANLIB := $(MINGW_PREFIX)-ranlib RANLIB := $(MINGW_PREFIX)-ranlib
CFLAGS ?= -O3 -Wno-parentheses CFLAGS ?= -O3 -Wno-parentheses -Wno-incompatible-pointer-types
LDFLAGS ?= LDFLAGS ?=
# ── FFTW: сборка из исходников ──────────────────────────────────────────────── # ── FFTW: сборка из исходников ────────────────────────────────────────────────

5
comm.h
View File

@ -43,6 +43,11 @@ warren@wpratt.com
#ifdef _WIN32 #ifdef _WIN32
#include <avrt.h> #include <avrt.h>
#endif #endif
#ifndef WDSP_FPE_GUARD
#define WDSP_FPE_GUARD ((void)0)
#define WDSP_FPE_RESTORE ((void)0)
#endif
#include "fftw3.h" #include "fftw3.h"
#include "amd.h" #include "amd.h"