Bug 1126985 Fix xpcom/base build with --enable-warnings-on-errors. r=froydnj

This commit is contained in:
Ben Kelly 2015-01-28 15:11:18 -05:00
parent 4aee79980d
commit ba50801a60
2 changed files with 7 additions and 6 deletions

View File

@ -740,10 +740,10 @@ private:
uint64_t size;
// Ignore the header line.
fgets(buffer, kBufferLen, iommu);
unused << fgets(buffer, kBufferLen, iommu);
// Ignore the separator line.
fgets(buffer, kBufferLen, iommu);
unused << fgets(buffer, kBufferLen, iommu);
const char* const kSep = "----";
const size_t kSepLen = 4;
@ -760,7 +760,7 @@ private:
}
// Ignore the orphaned header.
fgets(buffer, kBufferLen, iommu);
unused << fgets(buffer, kBufferLen, iommu);
// Read orphaned entries.
while (fgets(buffer, kBufferLen, iommu) &&
@ -787,7 +787,7 @@ private:
}
uint64_t size = 0;
fscanf(sizeFile, "%" SCNu64, &size);
unused << fscanf(sizeFile, "%" SCNu64, &size);
fclose(sizeFile);
return size;
@ -1029,7 +1029,7 @@ private:
// Bypass the header line.
char buff[1024];
fgets(buff, 1024, memFile);
unused << fgets(buff, 1024, memFile);
while (fscanf(memFile, kScanFormat, &gpuaddr, &useraddr, &size, &id,
flags, type, usage, &sglen) == kNumFields) {

View File

@ -12,6 +12,7 @@
#include "mozilla/Services.h"
#include "nsIObserverService.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/unused.h"
#ifdef XP_UNIX // {
#include "mozilla/Preferences.h"
@ -59,7 +60,7 @@ DumpSignalHandler(int aSignum)
if (sDumpPipeWriteFd != -1) {
uint8_t signum = static_cast<int>(aSignum);
write(sDumpPipeWriteFd, &signum, sizeof(signum));
unused << write(sDumpPipeWriteFd, &signum, sizeof(signum));
}
}