Closed Bug 1200097 Opened 4 years ago Closed 4 years ago

Fix warnings in logalloc

Categories

(Core :: Memory Allocator, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: njn, Assigned: njn)

References

Details

Attachments

(1 file)

FdPrintf.c has one warning that shows up in two different directories.
Comment on attachment 8654701 [details] [diff] [review]
Fix warnings in logalloc

Review of attachment 8654701 [details] [diff] [review]:
-----------------------------------------------------------------

::: memory/replace/logalloc/FdPrintf.cpp
@@ +125,5 @@
>    // See comment in FdPrintf.h as to why WriteFile is used.
>    DWORD written;
>    WriteFile(reinterpret_cast<HANDLE>(aFd), buf, b - buf, &written, nullptr);
>  #else
> +  mozilla::unused << write(aFd, buf, b - buf);

Ideally, this should just actually care about the result (especially if it's -1 and errno is EINTR). But meh.
Attachment #8654701 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/cd30c9b6ee53
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Depends on: 1200623
My OS X debug build stopped working (linking) after this change, with this error:

 0:26.48 /Users/msreckovic/Repos/mozilla-central/obj-x86_64-apple-darwin13.4.0/memory/replace/logalloc/tmp40oq0x.list:
 0:26.49     lock_impl_posix.o
 0:26.49     FdPrintf.o
 0:26.49     LogAlloc.o
 0:26.49 
 0:26.49 Undefined symbols for architecture x86_64:
 0:26.49   "mozilla::unused", referenced from:
 0:26.49       FdPrintf(long, char const*, ...) in FdPrintf.o
 0:26.49 ld: symbol(s) not found for architecture x86_64
 0:26.49 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Flags: needinfo?(n.nethercote)
I see, it's bug 1200623.
Flags: needinfo?(n.nethercote)
You need to log in before you can comment on or make changes to this bug.