Skip to content

Commit 915a212

Browse files
authored
Silence compiler warnings (#42056)
1 parent c914062 commit 915a212

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/cgutils.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,8 +1711,8 @@ static jl_cgval_t typed_store(jl_codectx_t &ctx,
17111711
Compare = Current;
17121712
needloop = !isswapfield || Order != AtomicOrdering::NotAtomic;
17131713
}
1714-
BasicBlock *BB;
1715-
PHINode *CmpPhi;
1714+
BasicBlock *BB = NULL;
1715+
PHINode *CmpPhi = NULL;
17161716
if (needloop) {
17171717
BasicBlock *From = ctx.builder.GetInsertBlock();
17181718
BB = BasicBlock::Create(jl_LLVMContext, "xchg", ctx.f);
@@ -3303,8 +3303,8 @@ static jl_cgval_t emit_setfield(jl_codectx_t &ctx,
33033303
jl_cgval_t oldval = rhs;
33043304
if (!issetfield)
33053305
oldval = emit_unionload(ctx, addr, ptindex, jfty, fsz, al, strct.tbaa, true);
3306-
Value *Success;
3307-
BasicBlock *DoneBB;
3306+
Value *Success = NULL;
3307+
BasicBlock *DoneBB = NULL;
33083308
if (isreplacefield || ismodifyfield) {
33093309
if (ismodifyfield) {
33103310
if (needlock)

src/codegen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6012,8 +6012,8 @@ static jl_returninfo_t get_specsig_function(jl_codectx_t &ctx, Module *M, String
60126012
{
60136013
jl_returninfo_t props = {};
60146014
SmallVector<Type*, 8> fsig;
6015-
Type *rt;
6016-
Type *srt;
6015+
Type *rt = NULL;
6016+
Type *srt = NULL;
60176017
if (jl_is_structtype(jlrettype) && jl_is_datatype_singleton((jl_datatype_t*)jlrettype)) {
60186018
rt = T_void;
60196019
props.cc = jl_returninfo_t::Register;

src/datatype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1712,7 +1712,7 @@ jl_value_t *replace_nth_field(jl_datatype_t *st, jl_value_t *v, size_t i, jl_val
17121712
}
17131713
else {
17141714
jl_task_t *ct = jl_current_task;
1715-
uint8_t *psel;
1715+
uint8_t *psel = NULL;
17161716
if (isunion) {
17171717
psel = &((uint8_t*)v)[offs + fsz - 1];
17181718
rty = jl_nth_union_component(rty, *psel);

src/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2564,7 +2564,7 @@ mark: {
25642564
if (a->data == NULL || jl_array_len(a) == 0)
25652565
goto pop;
25662566
if (flags.ptrarray) {
2567-
if (jl_tparam0(vt) == jl_symbol_type)
2567+
if ((jl_datatype_t*)jl_tparam0(vt) == jl_symbol_type)
25682568
goto pop;
25692569
size_t l = jl_array_len(a);
25702570
uintptr_t nptr = (l << 2) | (bits & GC_OLD);

0 commit comments

Comments
 (0)