Skip to content

Commit cd8ca9d

Browse files
committed
lib/zstd.h: move pragma before static
otherwise will cause dev-python/zstandard build failed when compiling with clang as reported at https://bugs.gentoo.org/950259 the root cause is pycparser, which is unfixed since reported 2.5 years ago, :( Signed-off-by: Z. Liu <[email protected]>
1 parent eca205f commit cd8ca9d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/zstd.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -1868,15 +1868,14 @@ ZSTDLIB_STATIC_API const ZSTD_DDict* ZSTD_initStaticDDict(
18681868
typedef void* (*ZSTD_allocFunction) (void* opaque, size_t size);
18691869
typedef void (*ZSTD_freeFunction) (void* opaque, void* address);
18701870
typedef struct { ZSTD_allocFunction customAlloc; ZSTD_freeFunction customFree; void* opaque; } ZSTD_customMem;
1871-
static
1872-
#ifdef __GNUC__
1873-
__attribute__((__unused__))
1874-
#endif
1875-
18761871
#if defined(__clang__) && __clang_major__ >= 5
18771872
#pragma clang diagnostic push
18781873
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
18791874
#endif
1875+
static
1876+
#ifdef __GNUC__
1877+
__attribute__((__unused__))
1878+
#endif
18801879
ZSTD_customMem const ZSTD_defaultCMem = { NULL, NULL, NULL }; /**< this constant defers to stdlib's functions */
18811880
#if defined(__clang__) && __clang_major__ >= 5
18821881
#pragma clang diagnostic pop

0 commit comments

Comments
 (0)