aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-08-24 10:13:32 +0200
committerMattias Andrée <maandree@kth.se>2024-08-24 10:13:32 +0200
commit3a341be5a3329f35259ddb56397f754158003866 (patch)
tree34f62389b82bb8f532b9d4e405ff1691d6a3f1f9 /process.c
parentFix bug (diff)
downloadlibsha2-3a341be5a3329f35259ddb56397f754158003866.tar.gz
libsha2-3a341be5a3329f35259ddb56397f754158003866.tar.bz2
libsha2-3a341be5a3329f35259ddb56397f754158003866.tar.xz
Fix warning
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--process.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/process.c b/process.c
index d7d6ab8..eef61f8 100644
--- a/process.c
+++ b/process.c
@@ -249,6 +249,7 @@ have_sha_intrinsics(void)
{
static volatile int ret = -1;
static volatile atomic_flag spinlock = ATOMIC_FLAG_INIT;
+ int a, b, c, d;
if (ret != -1)
return ret;
@@ -258,7 +259,8 @@ have_sha_intrinsics(void)
if (ret != -1)
goto out;
- int a = 7, b, c = 0, d;
+ a = 7;
+ c = 0;
__asm__ volatile("cpuid" : "=a"(a), "=b"(b), "=c"(c), "=d"(d) : "a"(a), "c"(c));
if (!(b & (1 << 29))) {
ret = 0;