Skip to content

Commit 7eeb778

Browse files
committed
Merge #58: Move #ifdef HAVE_CLMUL guard outside of the EnableClmul definition
4d9db2b Move `#ifdef HAVE_CLMUL` guard outside of the EnableClmul definition (Hennadii Stepanov) Pull request description: All of the `EnableClmul()` function call sites are guarded by the `HAVE_CLMUL` macro. Using the same guarding for its definition gets rid of a possible `-Wunused-function` compiler warning. Closes #53. ACKs for top commit: sipa: utACK 4d9db2b Tree-SHA512: 02eed1c9d2f23368f97fe8e4aaf63ecd287915bb36947af12e2860c2b29de17c21a027a26e9fce2dd666b719086277917c0d8b0ee64984a49afdd812d4264c45
2 parents 89629eb + 4d9db2b commit 7eeb778

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/minisketch.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ enum class FieldImpl {
6363
#endif
6464
};
6565

66+
#ifdef HAVE_CLMUL
6667
static inline bool EnableClmul()
6768
{
68-
#ifdef HAVE_CLMUL
6969
#ifdef _MSC_VER
7070
int regs[4];
7171
__cpuid(regs, 1);
@@ -74,10 +74,8 @@ static inline bool EnableClmul()
7474
uint32_t eax, ebx, ecx, edx;
7575
return (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (ecx & 0x2));
7676
#endif
77-
#else
78-
return false;
79-
#endif
8077
}
78+
#endif
8179

8280
Sketch* Construct(int bits, int impl)
8381
{

0 commit comments

Comments
 (0)