Skip to content

Commit

Permalink
Bug 1200623 - Fix FdPrintf.o link error in --disable-optimize builds.…
Browse files Browse the repository at this point in the history
… r=glandium.

--HG--
extra : rebase_source : 2225f8496f540a01a19477e6e5e77cbc56877dea
  • Loading branch information
nnethercote committed Sep 2, 2015
1 parent 29abc01 commit e5dc6b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions memory/replace/logalloc/FdPrintf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#endif
#include <cstring>
#include "mozilla/Assertions.h"
#include "mozilla/unused.h"

/* Template class allowing a limited number of increments on a value */
template <typename T>
Expand Down Expand Up @@ -126,7 +125,9 @@ FdPrintf(intptr_t aFd, const char* aFormat, ...)
DWORD written;
WriteFile(reinterpret_cast<HANDLE>(aFd), buf, b - buf, &written, nullptr);
#else
mozilla::unused << write(aFd, buf, b - buf);
// Using mozilla::unused is tricky in logalloc, so just use (void) instead.
int unused = write(aFd, buf, b - buf);
(void) unused;
#endif
va_end(ap);
}

0 comments on commit e5dc6b8

Please sign in to comment.