aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-04-16 16:26:28 +0000
committerMike Frysinger <vapier@gentoo.org>2013-04-16 16:26:28 +0000
commitb91a49c4ec021f55988034201a40b35408ffdd14 (patch)
treeb5982dfbf4afe18704cb4ea61b9aace33d71f23c
parentscanelf: use bool rather than char to avoid bogus gcc warning (filed upstream... (diff)
downloadpax-utils-b91a49c4ec021f55988034201a40b35408ffdd14.tar.gz
pax-utils-b91a49c4ec021f55988034201a40b35408ffdd14.tar.bz2
pax-utils-b91a49c4ec021f55988034201a40b35408ffdd14.zip
scanmacho: fix up signed warnings with newer gcc
-rw-r--r--paxmacho.c8
-rw-r--r--paxmacho.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/paxmacho.c b/paxmacho.c
index 1cd7b48..bd9fcf3 100644
--- a/paxmacho.c
+++ b/paxmacho.c
@@ -1,7 +1,7 @@
/*
* Copyright 2003-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.c,v 1.20 2012/11/04 07:26:24 vapier Exp $
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.c,v 1.21 2013/04/16 16:26:28 vapier Exp $
*
* Copyright 2005-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org>
@@ -23,10 +23,10 @@ static const char STR_UNKNOWN[] = "unknown";
#define QUERY(n) { #n, n }
typedef const struct {
const char *str;
- int value;
+ unsigned int value;
} pairtype;
-static inline const char *find_pairtype(pairtype *pt, int type)
+static inline const char *find_pairtype(pairtype *pt, unsigned int type)
{
size_t i;
for (i = 0; pt[i].str; ++i)
@@ -255,7 +255,7 @@ fatobj *readmacho_buffer(const char *filename, char *buffer, size_t buffer_len)
*/
if (fhdr->magic == FAT_MAGIC || fhdr->magic == FAT_CIGAM) {
/* we're indeed in a FAT file */
- int i;
+ uint32_t i;
fatobj *fobj = ret;
struct fat_arch *farch;
void *dptr = ret->data + sizeof(struct fat_header);
diff --git a/paxmacho.h b/paxmacho.h
index 53685fc..c142da3 100644
--- a/paxmacho.h
+++ b/paxmacho.h
@@ -1,7 +1,7 @@
/*
* Copyright 2005-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.h,v 1.7 2012/11/04 07:26:24 vapier Exp $
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.h,v 1.8 2013/04/16 16:26:28 vapier Exp $
*
* Copyright 2005-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org>
@@ -15,7 +15,7 @@
#include "macho.h"
-#define MGET(swapped, value) (swapped ? bswap_32(value) : value)
+#define MGET(swapped, value) (swapped ? (typeof(value))bswap_32(value) : value)
#define MOBJGET(obj, member) MGET((obj)->swapped, (obj)->member)
typedef struct _fatobj {