File: 1050-code-errors.patch

package info (click to toggle)
pchar 1.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,040 kB
  • sloc: cpp: 12,972; sh: 2,510; makefile: 765
file content (55 lines) | stat: -rw-r--r-- 1,984 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Description: Fix code errors discovered by clang
Forwarded: no
Author: Petter Reinholdtsen <pere@hungry.com>
Last-Update: 2017-08-05

Index: pchar-alioth/PctestIpv4File.cc
===================================================================
--- pchar-alioth.orig/PctestIpv4File.cc	2017-08-05 08:26:43.844204184 +0200
+++ pchar-alioth/PctestIpv4File.cc	2017-08-05 08:26:43.836204130 +0200
@@ -84,6 +84,7 @@
 	fprintf(stderr, "Couldn't allocate memory for origin hostname.\n");
 	return -1;
     }
+    return 0;
 }
 
 //
Index: pchar-alioth/PctestIpv6File.cc
===================================================================
--- pchar-alioth.orig/PctestIpv6File.cc	2017-08-05 08:26:43.844204184 +0200
+++ pchar-alioth/PctestIpv6File.cc	2017-08-05 08:26:43.836204130 +0200
@@ -101,6 +101,7 @@
 	fprintf(stderr, "Couldn't allocate memory for origin hostname.\n");
 	return -1;
     }
+    return 0;
 }
 
 //
Index: pchar-alioth/ResultTable.cc
===================================================================
--- pchar-alioth.orig/ResultTable.cc	2017-08-05 08:26:43.844204184 +0200
+++ pchar-alioth/ResultTable.cc	2017-08-05 08:26:43.836204130 +0200
@@ -44,7 +44,7 @@
     // can't handle "new (footype *)[bar]".  We're trying to do:
     // data = new (double *) [columns];
     typedef double *DoublePtr;
-    data = new (double *[columns]);
+    data = new double *[columns];
     if (data == NULL) {
 	fprintf(stderr, "Couldn't allocate data array for a ResultTable\n");
 	exit(1);
Index: pchar-alioth/main.cc
===================================================================
--- pchar-alioth.orig/main.cc	2017-08-05 08:26:43.844204184 +0200
+++ pchar-alioth/main.cc	2017-08-05 08:26:43.836204130 +0200
@@ -376,7 +376,7 @@
 	case 'b': {
 	    Burst = atoi(optarg);
 	    if (Burst < 1) {
-		fprintf(stderr, "Warning: burst size %d too small; resetting to 1\n");
+		fprintf(stderr, "Warning: burst size %d too small; resetting to 1\n", Burst);
 		Burst = 1;
 	    }
 	    break;