Skip to content

Commit

Permalink
Fix issue #190
Browse files Browse the repository at this point in the history
Compiling with clang on Windows results in a warning and an error.

- eliminate warning in fastpbkdf2.c by excluding macro definitions for clang
- eliminate error in aegis/common/cpu.c by enclosing function name in parentheses
  • Loading branch information
utelle committed Jan 19, 2025
1 parent 6209db9 commit 03e0414
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/aegis/common/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static void
_cpuid(unsigned int cpu_info[4U], const unsigned int cpu_info_type)
{
#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))
__cpuid((int *) cpu_info, cpu_info_type);
(__cpuid)((int *) cpu_info, cpu_info_type);
#elif defined(HAVE_CPUID)
cpu_info[0] = cpu_info[1] = cpu_info[2] = cpu_info[3] = 0;
# ifdef __i386__
Expand Down
2 changes: 1 addition & 1 deletion src/fastpbkdf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "sha2.h"

/* --- MSVC doesn't support C99 --- */
#ifdef _MSC_VER
#if defined(_MSC_VER) && !defined(__clang__)
#define restrict
#define inline __inline
#define _Pragma __pragma
Expand Down

0 comments on commit 03e0414

Please sign in to comment.