From 535f8d176fa9a641ed66ea962cae6d0be65910b2 Mon Sep 17 00:00:00 2001 From: Troels Henriksen Date: Mon, 13 Feb 2023 10:38:50 +0100 Subject: [PATCH] Avoid warnings about "potentially uninitialized" variables. C compilers are (understandably) not smart enough to see that these are never actually used uninitialised. --- src/Futhark/CodeGen/Backends/GenericC/EntryPoints.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Futhark/CodeGen/Backends/GenericC/EntryPoints.hs b/src/Futhark/CodeGen/Backends/GenericC/EntryPoints.hs index d901998558..445806e744 100644 --- a/src/Futhark/CodeGen/Backends/GenericC/EntryPoints.hs +++ b/src/Futhark/CodeGen/Backends/GenericC/EntryPoints.hs @@ -224,7 +224,7 @@ onEntryPoint get_consts fname (Function (Just (EntryPoint ename results args)) o declMem name space stubParam (ScalarParam name ty) = do let ty' = primTypeToCType ty - decl [C.cdecl|$ty:ty' $id:name;|] + decl [C.cdecl|$ty:ty' $id:name = $exp:(blankPrimValue ty);|] vdType (TransparentValue (ScalarValue pt signed _)) = prettySigned (signed == Unsigned) pt