Skip to content

Commit b019712

Browse files
committed
Suppress more warnings with [[maybe_unused]]
1 parent 98ac5e6 commit b019712

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/CodeGen_PTX_Dev.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ void CodeGen_PTX_Dev::codegen_vector_reduce(const VectorReduce *op, const Expr &
551551
CodeGen_LLVM::codegen_vector_reduce(op, init);
552552
}
553553

554-
string CodeGen_PTX_Dev::march() const {
554+
[[maybe_unused]] string CodeGen_PTX_Dev::march() const {
555555
return "nvptx64";
556556
}
557557

src/CodeGen_Vulkan_Dev.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ void CodeGen_Vulkan_Dev::SPIRV_Emitter::scalarize(const Expr &e) {
476476
builder.update_id(result_id);
477477
}
478478

479-
SpvId CodeGen_Vulkan_Dev::SPIRV_Emitter::map_type_to_pair(const Type &t) {
479+
[[maybe_unused]] SpvId CodeGen_Vulkan_Dev::SPIRV_Emitter::map_type_to_pair(const Type &t) {
480480
debug(2) << "CodeGen_Vulkan_Dev::SPIRV_Emitter::map_type_to_pair(): " << t << "\n";
481481
SpvId base_type_id = builder.declare_type(t);
482482
SpvBuilder::StructMemberTypes member_type_ids = {base_type_id, base_type_id};

src/Target.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ std::optional<T> getsysctl(const char *name) {
223223
return std::make_optional(value);
224224
}
225225

226-
bool sysctl_is_set(const char *name) {
226+
[[maybe_unused]] bool sysctl_is_set(const char *name) {
227227
return getsysctl<int>(name).value_or(0);
228228
}
229229

230-
bool is_armv7s() {
230+
[[maybe_unused]] bool is_armv7s() {
231231
return getsysctl<cpu_type_t>("hw.cputype") == CPU_TYPE_ARM &&
232232
getsysctl<cpu_subtype_t>("hw.cpusubtype") == CPU_SUBTYPE_ARM_V7S;
233233
}

0 commit comments

Comments
 (0)