File: fix_gcc6.patch

package info (click to toggle)
infinipath-psm 3.3+19.g67c0807.open-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,644 kB
  • ctags: 4,684
  • sloc: ansic: 34,269; makefile: 334; asm: 47
file content (31 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download
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
Description: fix for building with GCC 6.0
This patch fixes the following errors:

psm_diags.c: In function 'memcpy_check_size':
psm_diags.c:286:7: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
       if (dst) psmi_free(dst);
       ^~
psm_diags.c:284:5: note: ...this 'if' clause, but it is not
     if (src == NULL || dst == NULL)
     ^~

Author: Ana Guerrero Lopez <ana@ekaia.org>
Bug-Debian: https://bugs.debian.org/811940
Last-Update: 2016-07-26
Forwarded: no

--- infinipath-psm-3.3+19.g67c0807.open.orig/psm_diags.c
+++ infinipath-psm-3.3+19.g67c0807.open/psm_diags.c
@@ -281,10 +281,11 @@ memcpy_check_size (memcpy_fn_t fn, int *
   if (USE_MALLOC) {
     src = psmi_malloc(PSMI_EP_NONE, UNDEFINED, size);
     dst = psmi_malloc(PSMI_EP_NONE, UNDEFINED, size);
-    if (src == NULL || dst == NULL) 
+    if (src == NULL || dst == NULL) {
       if (src) psmi_free(src);
       if (dst) psmi_free(dst);
       return -1;
+	}
   }
   else {
     void *src_p = NULL, *dst_p = NULL;