File: 13-unused-write.patch

package info (click to toggle)
firefox 147.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,683,320 kB
  • sloc: cpp: 7,607,359; javascript: 6,533,295; ansic: 3,775,223; python: 1,415,500; xml: 634,561; asm: 438,949; java: 186,241; sh: 62,752; makefile: 18,079; objc: 13,092; perl: 12,808; yacc: 4,583; cs: 3,846; pascal: 3,448; lex: 1,720; ruby: 1,003; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10; exp: 6
file content (18 lines) | stat: -rw-r--r-- 672 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
commit ce18e87898f32a5f683d8e5ea9841c735b24619a
Author: Christian Holler <choller@mozilla.com>
Date:   Thu Jul 30 18:35:46 2020 +0200

    [libFuzzer] Suppress warnings about unused return values

diff --git a/FuzzerIO.cpp b/FuzzerIO.cpp
index 54cc4ee54be0..8d5b3ae3e1ae 100644
--- a/FuzzerIO.cpp
+++ b/FuzzerIO.cpp
@@ -81,7 +81,7 @@ void WriteToFile(const uint8_t *Data, size_t Size, const std::string &Path) {
   // Use raw C interface because this function may be called from a sig handler.
   FILE *Out = fopen(Path.c_str(), "wb");
   if (!Out) return;
-  fwrite(Data, sizeof(Data[0]), Size, Out);
+  (void)fwrite(Data, sizeof(Data[0]), Size, Out);
   fclose(Out);
 }