Browse Source

add upstream fix for clang compile issues

Waldemar Brodkorb 9 years ago
parent
commit
4b6a183858
1 changed files with 22 additions and 0 deletions
  1. 22 0
      package/openocd/patches/patch-src_flash_nor_sim3x_c

+ 22 - 0
package/openocd/patches/patch-src_flash_nor_sim3x_c

@@ -0,0 +1,22 @@
+--- openocd-0.9.0.orig/src/flash/nor/sim3x.c	2015-04-24 17:09:54.000000000 +0200
++++ openocd-0.9.0/src/flash/nor/sim3x.c	2016-04-24 17:17:47.000000000 +0200
+@@ -864,14 +864,12 @@ static int sim3x_flash_info(struct flash
+ 				return ERROR_BUF_TOO_SMALL;
+ 
+ 			/* Package */
+-			if (sim3x_info->device_package) {
+-				printed = snprintf(buf, buf_size, "-G%s", sim3x_info->device_package);
+-				buf += printed;
+-				buf_size -= printed;
++			printed = snprintf(buf, buf_size, "-G%s", sim3x_info->device_package);
++			buf += printed;
++			buf_size -= printed;
+ 
+-				if (buf_size <= 0)
+-					return ERROR_BUF_TOO_SMALL;
+-			}
++			if (buf_size <= 0)
++				return ERROR_BUF_TOO_SMALL;
+ 		}
+ 	}
+