Skip to content

Commit

Permalink
Resolve '-Wzero-as-null-pointer-constant' warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Minty-Meeo committed Mar 24, 2023
1 parent 111c9be commit c47660e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/github-issues.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef struct {

MEMFILE *memfopen() {
MEMFILE *mf = (MEMFILE *)malloc(sizeof(MEMFILE));
mf->data = NULL;
mf->data = nullptr;
mf->size = 0;
return mf;
}
Expand Down
2 changes: 1 addition & 1 deletion picojson.h
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ template <typename Iter> inline std::string parse(value &out, Iter &pos, const I

template <typename Context, typename Iter> inline Iter _parse(Context &ctx, const Iter &first, const Iter &last, std::string *err) {
input<Iter> in(first, last);
if (!_parse(ctx, in) && err != NULL) {
if (!_parse(ctx, in) && err != nullptr) {
char buf[64];
SNPRINTF(buf, sizeof(buf), "syntax error at line %d near: ", in.line());
*err = buf;
Expand Down

0 comments on commit c47660e

Please sign in to comment.