Skip to content

Commit

Permalink
Fix some C/C++ compiler warnings (#42348)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Sep 23, 2021
1 parent 2174ee1 commit 29609cd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3593,7 +3593,7 @@ static Value *emit_defer_signal(jl_codectx_t &ctx)
return ctx.builder.CreateInBoundsGEP(T_sigatomic, ptls, ArrayRef<Value*>(offset), "jl_defer_signal");
}

#ifndef NDEBUG
#ifndef JL_NDEBUG
static int compare_cgparams(const jl_cgparams_t *a, const jl_cgparams_t *b)
{
return
Expand Down
2 changes: 2 additions & 0 deletions src/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@ static Value *emit_unboxed_coercion(jl_codectx_t &ctx, Type *to, Value *unboxed)
unboxed = emit_bitcast(ctx, unboxed, to);
}
else if (!ty->isIntOrPtrTy() && !ty->isFloatingPointTy()) {
#ifndef JL_NDEBUG
const DataLayout &DL = jl_data_layout;
#endif
assert(DL.getTypeSizeInBits(ty) == DL.getTypeSizeInBits(to));
AllocaInst *cast = ctx.builder.CreateAlloca(ty);
ctx.builder.CreateStore(unboxed, cast);
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-simdloop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ PreservedAnalyses LowerSIMDLoop::run(Module &M, ModuleAnalysisManager &AM)

namespace {
class LowerSIMDLoopLegacy : public ModulePass {
LowerSIMDLoop Impl;
//LowerSIMDLoop Impl;

public:
static char ID;
Expand Down
2 changes: 1 addition & 1 deletion src/signals-mach.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ void *mach_profile_listener(void *arg)
bt_data_prof[bt_size_cur++].uintptr = ptls->tid + 1;

// store task id
bt_data_prof[bt_size_cur++].uintptr = ptls->current_task;
bt_data_prof[bt_size_cur++].uintptr = (uintptr_t)ptls->current_task;

// store cpu cycle clock
bt_data_prof[bt_size_cur++].uintptr = cycleclock();
Expand Down

0 comments on commit 29609cd

Please sign in to comment.