Skip to content

Commit

Permalink
Avoid warnings about "potentially uninitialized" variables.
Browse files Browse the repository at this point in the history
C compilers are (understandably) not smart enough to see that these
are never actually used uninitialised.
  • Loading branch information
athas committed Feb 13, 2023
1 parent 9e4ab92 commit 591b479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Futhark/CodeGen/Backends/GenericC/EntryPoints.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 591b479

Please sign in to comment.