Unverified Commit 5185c522 authored by Muhammed Fatih BALIN's avatar Muhammed Fatih BALIN Committed by GitHub
Browse files

[Misc] Eliminate compile warnings (#6685)

parent 15d05be3
......@@ -15,7 +15,7 @@ namespace graphbolt {
#ifdef GRAPHBOLT_USE_CUDA
#define GRAPHBOLT_DISPATCH_CUDA_ONLY_DEVICE(device_type, name, ...) \
if (device_type == c10::DeviceType::CUDA) { \
const auto XPU = c10::DeviceType::CUDA; \
[[maybe_unused]] auto XPU = c10::DeviceType::CUDA; \
__VA_ARGS__ \
} else { \
TORCH_CHECK(false, name, " is only available on CUDA device."); \
......
......@@ -295,7 +295,7 @@ void LibraVertexCut(
for (int64_t c = 0; c < nc; c++) printf("%ld ", community_edges[c]);
printf("\n");
delete community_edges;
delete[] community_edges;
fclose(fp);
}
......
......@@ -182,7 +182,7 @@ DGL_REGISTER_GLOBAL("transform._CAPI_DGLCompactGraphs")
List<HeteroGraphRef> compacted_graph_refs;
List<Value> induced_nodes;
for (const HeteroGraphPtr g : result_pair.first)
for (const HeteroGraphPtr &g : result_pair.first)
compacted_graph_refs.push_back(HeteroGraphRef(g));
for (const IdArray &ids : result_pair.second)
induced_nodes.push_back(Value(MakeValue(ids)));
......
......@@ -61,7 +61,7 @@ void _TestRemainder_MapToX() {
// every global index should have the same remainder as the part id
ASSERT_EQ(global->shape[0], local->shape[0]);
global = global.CopyTo(CPU);
for (size_t i = 0; i < global->shape[0]; ++i) {
for (int64_t i = 0; i < global->shape[0]; ++i) {
EXPECT_EQ(Ptr<IdType>(global)[i] % num_parts, part_id)
<< "i=" << i << ", num_parts=" << num_parts
<< ", part_id=" << part_id;
......@@ -70,7 +70,7 @@ void _TestRemainder_MapToX() {
// the remapped local indices to should match the original
local = local.CopyTo(CPU);
ASSERT_EQ(local->shape[0], act_local->shape[0]);
for (size_t i = 0; i < act_local->shape[0]; ++i) {
for (int64_t i = 0; i < act_local->shape[0]; ++i) {
EXPECT_EQ(Ptr<IdType>(local)[i], Ptr<IdType>(act_local)[i]);
}
}
......@@ -167,7 +167,7 @@ void _TestRange_MapToX() {
ASSERT_EQ(global->shape[0], local->shape[0]);
global = global.CopyTo(CPU);
for (size_t i = 0; i < global->shape[0]; ++i) {
for (int64_t i = 0; i < global->shape[0]; ++i) {
EXPECT_EQ(
_FindPart(Ptr<IdType>(global)[i], Ptr<IdType>(range), num_parts),
part_id)
......@@ -178,7 +178,7 @@ void _TestRange_MapToX() {
// the remapped local indices to should match the original
local = local.CopyTo(CPU);
ASSERT_EQ(local->shape[0], act_local->shape[0]);
for (size_t i = 0; i < act_local->shape[0]; ++i) {
for (int64_t i = 0; i < act_local->shape[0]; ++i) {
EXPECT_EQ(Ptr<IdType>(local)[i], Ptr<IdType>(act_local)[i]);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment