File: 13-unused-write.patch

package info (click to toggle)
firefox 149.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,767,760 kB
  • sloc: cpp: 7,416,064; javascript: 6,752,859; ansic: 3,774,850; python: 1,250,473; xml: 641,578; asm: 439,191; java: 186,617; sh: 56,634; makefile: 18,856; objc: 13,092; perl: 12,763; pascal: 5,960; yacc: 4,583; cs: 3,846; lex: 1,720; ruby: 1,002; php: 436; lisp: 258; awk: 105; sql: 66; sed: 53; csh: 10; exp: 6
file content (18 lines) | stat: -rw-r--r-- 672 bytes parent folder | download | duplicates (3)
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);
 }