mirror of
https://github.com/logos-storage/nim-libplum.git
synced 2026-06-07 09:40:01 +00:00
Remove duplicated pragma
This commit is contained in:
parent
4532517ca5
commit
f66c6114f9
@ -15,17 +15,6 @@ const
|
||||
libraryPath = libplumPath & "/libplum.a"
|
||||
{.passc: "-I" & includePath & " -DPLUM_STATIC".}
|
||||
{.passl: libraryPath.}
|
||||
# libplum declares some parameters as `const T*` in C (read-only pointer).
|
||||
# Nim has no equivalent, so the generated C code drops the `const`, causing
|
||||
# a type mismatch warning in GCC 15+. This pragma suppresses that warning
|
||||
# only in this translation unit and is valid for both C and C++.
|
||||
{.
|
||||
emit: """
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic ignored "-Wno-incompatible-pointer-types"
|
||||
#endif
|
||||
"""
|
||||
.}
|
||||
|
||||
when defined(windows):
|
||||
{.passl: "-lws2_32 -liphlpapi -lbcrypt".}
|
||||
|
||||
@ -12,6 +12,10 @@ import chronos/threadsync
|
||||
import results
|
||||
import ./libplum
|
||||
|
||||
# libplum declares some parameters as `const T*` in C (read-only pointer).
|
||||
# Nim has no equivalent, so the generated C code drops the `const`, causing
|
||||
# a type mismatch warning in GCC 15+. This pragma suppresses that warning
|
||||
# only in this translation unit and is valid for both C and C++.
|
||||
{.
|
||||
emit: """
|
||||
#ifdef __GNUC__
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user