Skip to content

Commit cc30586

Browse files
fingolfinKristofferC
authored andcommitted
Fix some C/C++ compiler warnings (#42348)
1 parent a0aa4a8 commit cc30586

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/cgutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3593,7 +3593,7 @@ static Value *emit_defer_signal(jl_codectx_t &ctx)
35933593
return ctx.builder.CreateInBoundsGEP(T_sigatomic, ptls, ArrayRef<Value*>(offset), "jl_defer_signal");
35943594
}
35953595

3596-
#ifndef NDEBUG
3596+
#ifndef JL_NDEBUG
35973597
static int compare_cgparams(const jl_cgparams_t *a, const jl_cgparams_t *b)
35983598
{
35993599
return

src/intrinsics.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ static Value *emit_unboxed_coercion(jl_codectx_t &ctx, Type *to, Value *unboxed)
304304
unboxed = emit_bitcast(ctx, unboxed, to);
305305
}
306306
else if (!ty->isIntOrPtrTy() && !ty->isFloatingPointTy()) {
307+
#ifndef JL_NDEBUG
307308
const DataLayout &DL = jl_data_layout;
309+
#endif
308310
assert(DL.getTypeSizeInBits(ty) == DL.getTypeSizeInBits(to));
309311
AllocaInst *cast = ctx.builder.CreateAlloca(ty);
310312
ctx.builder.CreateStore(unboxed, cast);

src/llvm-simdloop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ PreservedAnalyses LowerSIMDLoop::run(Module &M, ModuleAnalysisManager &AM)
239239

240240
namespace {
241241
class LowerSIMDLoopLegacy : public ModulePass {
242-
LowerSIMDLoop Impl;
242+
//LowerSIMDLoop Impl;
243243

244244
public:
245245
static char ID;

src/signals-mach.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ void *mach_profile_listener(void *arg)
594594
bt_data_prof[bt_size_cur++].uintptr = ptls->tid + 1;
595595

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

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

0 commit comments

Comments
 (0)