From aec76bb4c859087f209351cabc23d2f25521321f Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Thu, 2 May 2024 13:58:05 -0700 Subject: [PATCH] Remove unused-but-set variables in vision/fair/pytorch3d/pytorch3d/csrc/pulsar/include/renderer.render.device.h +1 Summary: This diff removes a variable that was set, but which was not used. LLVM-15 has a warning `-Wunused-but-set-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused but set variables often indicate a programming mistake, but can also just be unnecessary cruft that harms readability and performance. Removing this variable will not change how your code works, but the unused variable may indicate your code isn't working the way you thought it was. I've gone through each of these by hand, but mistakes may have slipped through. If you feel the diff needs changes before landing, **please commandeer** and make appropriate changes: there are hundreds of these and responding to them individually is challenging. For questions/comments, contact r-barnes. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: bottler Differential Revision: D56886956 fbshipit-source-id: 0c515ed98b812b1c106a59e19ec90751ce32e8c0 --- pytorch3d/csrc/pulsar/include/renderer.render.device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch3d/csrc/pulsar/include/renderer.render.device.h b/pytorch3d/csrc/pulsar/include/renderer.render.device.h index 66a62c31..d1fe23f4 100644 --- a/pytorch3d/csrc/pulsar/include/renderer.render.device.h +++ b/pytorch3d/csrc/pulsar/include/renderer.render.device.h @@ -99,7 +99,7 @@ GLOBAL void render( /** Whether loading of balls is completed. */ SHARED bool loading_done; /** The number of balls loaded overall (just for statistics). */ - SHARED int n_balls_loaded; + [[maybe_unused]] SHARED int n_balls_loaded; /** The area this thread block covers. */ SHARED IntersectInfo block_area; if (thread_block.thread_rank() == 0) {