Skip to content

Commit

Permalink
Fix deprecated use of 0/NULL in fatal/test/type.h + 3
Browse files Browse the repository at this point in the history
Summary:
`nullptr` is typesafe. `0` and `NULL` are not. In the future, only `nullptr` will be allowed.

This diff helps us embrace the future _now_ in service of enabling `-Wzero-as-null-pointer-constant`.

Reviewed By: meyering

Differential Revision: D54163064

fbshipit-source-id: 1b597d8f4893bdb9961326c4c2e6e9c9ada78aad
  • Loading branch information
r-barnes authored and facebook-github-bot committed Feb 26, 2024
1 parent fa438c9 commit 4fe76dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fatal/test/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace fatal {
std::string type_str(std::string &out, std::type_info const &type) {
# ifdef __GNUC__
int status;
auto name = abi::__cxa_demangle(type.name(), 0, 0, &status);
auto name = abi::__cxa_demangle(type.name(), nullptr, nullptr, &status);

if (name) {
out.append(name);
Expand Down

0 comments on commit 4fe76dd

Please sign in to comment.