Skip to content

Commit

Permalink
Remove unused variables in dynolog/src/ODSJsonLogger.cpp
Browse files Browse the repository at this point in the history
Summary:
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 variables can compromise readability or, worse, performance.

This diff either (a) removes an unused variable and, possibly, it's associated code, or (b) qualifies the variable with `[[maybe_unused]]`, mostly in cases where the variable _is_ used, but, eg, in an `assert` statement that isn't present in production code.

 - If you approve of this diff, please use the "Accept & Ship" button :-)

Reviewed By: danzimm, meyering

Differential Revision: D52848030
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jan 18, 2024
1 parent 2d7180d commit 8e90520
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dynolog/src/ODSJsonLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ DEFINE_string(category_id, "", "The category id of the ODS endpoint");
DEFINE_string(ods_entity_prefix, "", "The prefix for ODS entity name");

namespace dynolog {

#ifdef USE_GRAPH_ENDPOINT
constexpr char kODSUrl[] = "https://graph.facebook.com/v2.2/ods_metrics";
#endif

ODSJsonLogger::ODSJsonLogger() : hostname_(facebook::hbt::getHostName()) {}

Expand Down

0 comments on commit 8e90520

Please sign in to comment.