crosstool-ng/patches/ltrace/0.7.3/004-compile-warning.patch
Bryan Hundven d90a3c0ca5 ltrace: Sync ltrace patches with debian
This commit syncs the patches applied to ltrace with debian:
https://sources.debian.net/src/ltrace/0.7.3-5/debian/patches/

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
2015-09-01 19:17:31 -07:00

29 lines
965 B
Diff

From: Juan Cespedes <cespedes@debian.org>
Description: Fix compile warning
Last-Update: 2014-01-02
Forwarded: not-needed
--- ltrace-0.7.3.orig/value.c
+++ ltrace-0.7.3/value.c
@@ -284,7 +284,7 @@ value_init_deref(struct value *ret_val,
/* We need "long" to be long enough to hold platform
* pointers. */
- typedef char assert__long_enough_long[-(sizeof(l) < sizeof(void *))];
+ (void)sizeof(char[1 - 2*(sizeof(l) < sizeof(void *))]);
value_common_init(ret_val, valp->inferior, valp,
valp->type->u.ptr_info.info, 0);
--- ltrace-0.7.3.orig/lens_default.c
+++ ltrace-0.7.3/lens_default.c
@@ -344,7 +344,7 @@ format_array(FILE *stream, struct value
{
/* We need "long" to be long enough to cover the whole address
* space. */
- typedef char assert__long_enough_long[-(sizeof(long) < sizeof(void *))];
+ (void)sizeof(char[1 - 2*(sizeof(long) < sizeof(void *))]);
long l;
if (expr_eval_word(length, value, arguments, &l) < 0)
return -1;