Closed Bug 1412214 Opened 7 years ago Closed 6 years ago

mach static-analysis modernize-use-nullptr warns about strerror_r, but shouldn't

Categories

(Developer Infrastructure :: Source Code Analysis, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glandium, Unassigned)

Details

Warning: modernize-use-nullptr in /home/glandium/gecko/memory/build/mozjemalloc.cpp: use nullptr
/home/glandium/gecko/memory/build/mozjemalloc.cpp:1576:46: warning: use nullptr [modernize-use-nullptr]
                if (strerror_r(errno, buf, sizeof(buf)) == 0) {
                                                           ^
                                                           nullptr


Except strerror_r is not strerror. It returns an int, not a pointer. Using nullptr results in a build error:

 /builds/worker/workspace/build/src/memory/build/mozjemalloc.cpp:1576:46: error: invalid operands of types 'int' and 'std::nullptr_t' to binary 'operator==' [log…]
This is an upstream issue, we should forward that.
Priority: -- → P3
Product: Core → Firefox Build System
I think it has been fixed now.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.