From 554a30da41925c6e43cce9ab18c0039685ac2a25 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Fri, 10 Jul 2026 20:03:34 +0200 Subject: [PATCH] fix(rust): remove redundant common shim declarations The common C shims include headers that already declare every Rust-exported symbol. Remove duplicate declarations so strict C builds do not report redundant declarations or macro-expanded aliases. The shims remain intentionally declaration-only; Rust still owns the exported implementation. Test Plan: - compile debug.c with -Wall -Wextra -Werror - compile error_private.c with -Wall -Wextra -Werror - compile zstd_common.c with -Wall -Wextra -Werror Refs: rust/README.md --- lib/common/debug.c | 1 - lib/common/error_private.c | 3 +-- lib/common/zstd_common.c | 6 ------ 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/common/debug.c b/lib/common/debug.c index aa2063f32..64f0b712b 100644 --- a/lib/common/debug.c +++ b/lib/common/debug.c @@ -1,4 +1,3 @@ #include "debug.h" /* Implementation moved to Rust (rust/src/debug.rs) */ -extern int g_debuglevel; diff --git a/lib/common/error_private.c b/lib/common/error_private.c index ea09f74b0..80b4e5d55 100644 --- a/lib/common/error_private.c +++ b/lib/common/error_private.c @@ -1,4 +1,3 @@ #include "error_private.h" -// Implementation moved to Rust -extern const char* ERR_getErrorString(ERR_enum code); +/* Implementation moved to Rust (rust/src/errors.rs). */ diff --git a/lib/common/zstd_common.c b/lib/common/zstd_common.c index 9d234b750..1ddce2f76 100644 --- a/lib/common/zstd_common.c +++ b/lib/common/zstd_common.c @@ -2,9 +2,3 @@ #include "zstd_internal.h" /* Implementation moved to Rust (rust/src/zstd_common.rs) */ -extern unsigned ZSTD_versionNumber(void); -extern const char* ZSTD_versionString(void); -extern unsigned ZSTD_isError(size_t code); -extern const char* ZSTD_getErrorName(size_t code); -extern ZSTD_ErrorCode ZSTD_getErrorCode(size_t code); -extern const char* ZSTD_getErrorString(ZSTD_ErrorCode code);