Skip to content

Commit

Permalink
Replace DCHECK_NOTNULL in void context in dsi/logger/cpp/LoggerBase.c…
Browse files Browse the repository at this point in the history
…pp +3

Summary:
`DCHECK_NOTNULL` returns its argument, which triggers `-Wunused-value` warnings in void context.
Replace it with `DCHECK_NE($$, nullptr)` which conveys the same intent without the warning.

(3 files modified.)

Reviewed By: Orvid

Differential Revision: D69618772

fbshipit-source-id: 14cecb6ef664db490e67a18d20080b7160d61da1
  • Loading branch information
r-barnes authored and facebook-github-bot committed Feb 14, 2025
1 parent 7bde3a1 commit 6031455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion folly/io/IOBuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ IOBuf IOBuf::cloneCoalescedAsValueWithHeadroomTailroom(
auto current = this;
do {
if (current->length() > 0) {
DCHECK_NOTNULL(current->data());
DCHECK_NE(current->data(), nullptr);
DCHECK_LE(current->length(), newBuf.tailroom());
memcpy(newBuf.writableTail(), current->data(), current->length());
newBuf.append(current->length());
Expand Down

0 comments on commit 6031455

Please sign in to comment.