Skip to content

Commit

Permalink
Fix deprecated use of 0/NULL in velox/external/utf8proc/utf8procImpl.…
Browse files Browse the repository at this point in the history
…h + 3

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: D54163050

fbshipit-source-id: 1fc965ea9605424ece329548355d47cd07e2e91e
  • Loading branch information
r-barnes authored and facebook-github-bot committed Feb 27, 2024
1 parent 430282a commit 11eab1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions velox/external/utf8proc/utf8procImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ UTF8PROC_DLLEXPORT utf8proc_bool utf8proc_grapheme_break_stateful(

UTF8PROC_DLLEXPORT utf8proc_bool
utf8proc_grapheme_break(utf8proc_int32_t c1, utf8proc_int32_t c2) {
return utf8proc_grapheme_break_stateful(c1, c2, NULL);
return utf8proc_grapheme_break_stateful(c1, c2, nullptr);
}

static utf8proc_int32_t seqindex_decode_entry(const utf8proc_uint16_t** entry) {
Expand Down Expand Up @@ -589,7 +589,7 @@ UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_decompose(
utf8proc_ssize_t bufsize,
utf8proc_int16_t options) {
return utf8proc_decompose_custom(
str, strlen, buffer, bufsize, options, NULL, NULL);
str, strlen, buffer, bufsize, options, nullptr, nullptr);
}

UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_decompose_custom(
Expand Down
6 changes: 3 additions & 3 deletions velox/tpch/gen/dbgen/include/dbgen/dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,9 @@ struct DBGenContext {
static constexpr double dM = 2147483647.0;

tdef tdefs[10] = {
{"part.tbl", "part table", 200000, NULL, NULL, PSUPP, 0},
{"partsupp.tbl", "partsupplier table", 200000, NULL, NULL, NONE, 0},
{"supplier.tbl", "suppliers table", 10000, NULL, NULL, NONE, 0},
{"part.tbl", "part table", 200000, nullptr, nullptr, PSUPP, 0},
{"partsupp.tbl", "partsupplier table", 200000, nullptr, nullptr, NONE, 0},
{"supplier.tbl", "suppliers table", 10000, nullptr, nullptr, NONE, 0},
{"customer.tbl", "customers table", 150000, NULL, NULL, NONE, 0},
{"orders.tbl", "order table", 150000, NULL, NULL, LINE, 0},
{"lineitem.tbl", "lineitem table", 150000, NULL, NULL, NONE, 0},
Expand Down

0 comments on commit 11eab1a

Please sign in to comment.