diff mbox

lib: fwts_uefi: cast to __SWORD_TYPE 32 bit builds

Message ID 1366706065-32018-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King April 23, 2013, 8:34 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Fix 32 bit build failures:

fwts_uefi.c: In function 'fwts_uefi_get_interface':
fwts_uefi.c:130:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
cc1: all warnings being treated as errors

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_uefi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Alex Hung April 23, 2013, 9:31 a.m. UTC | #1
On 04/23/2013 04:34 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Fix 32 bit build failures:
>
> fwts_uefi.c: In function 'fwts_uefi_get_interface':
> fwts_uefi.c:130:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> cc1: all warnings being treated as errors
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/src/fwts_uefi.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
> index 8149d23..d18c7b7 100644
> --- a/src/lib/src/fwts_uefi.c
> +++ b/src/lib/src/fwts_uefi.c
> @@ -60,9 +60,9 @@ typedef struct {
>   #define UEFI_IFACE_EFIVARS		(3)	/* efivar fs */
>
>   /* File system magic numbers */
> -#define PSTOREFS_MAGIC          0x6165676C
> -#define EFIVARFS_MAGIC          0xde5e81e4
> -#define SYS_FS_MAGIC		0x62656572
> +#define PSTOREFS_MAGIC          ((__SWORD_TYPE)0x6165676C)
> +#define EFIVARFS_MAGIC          ((__SWORD_TYPE)0xde5e81e4)
> +#define SYS_FS_MAGIC		((__SWORD_TYPE)0x62656572)
>
>   /*
>    *  fwts_uefi_get_interface()
>
Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin April 26, 2013, 2:06 a.m. UTC | #2
On Tue, Apr 23, 2013 at 4:34 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Fix 32 bit build failures:
>
> fwts_uefi.c: In function 'fwts_uefi_get_interface':
> fwts_uefi.c:130:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
> cc1: all warnings being treated as errors
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_uefi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
> index 8149d23..d18c7b7 100644
> --- a/src/lib/src/fwts_uefi.c
> +++ b/src/lib/src/fwts_uefi.c
> @@ -60,9 +60,9 @@ typedef struct {
>  #define UEFI_IFACE_EFIVARS             (3)     /* efivar fs */
>
>  /* File system magic numbers */
> -#define PSTOREFS_MAGIC          0x6165676C
> -#define EFIVARFS_MAGIC          0xde5e81e4
> -#define SYS_FS_MAGIC           0x62656572
> +#define PSTOREFS_MAGIC          ((__SWORD_TYPE)0x6165676C)
> +#define EFIVARFS_MAGIC          ((__SWORD_TYPE)0xde5e81e4)
> +#define SYS_FS_MAGIC           ((__SWORD_TYPE)0x62656572)
>
>  /*
>   *  fwts_uefi_get_interface()
> --
> 1.8.1.2
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
diff mbox

Patch

diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
index 8149d23..d18c7b7 100644
--- a/src/lib/src/fwts_uefi.c
+++ b/src/lib/src/fwts_uefi.c
@@ -60,9 +60,9 @@  typedef struct {
 #define UEFI_IFACE_EFIVARS		(3)	/* efivar fs */
 
 /* File system magic numbers */
-#define PSTOREFS_MAGIC          0x6165676C
-#define EFIVARFS_MAGIC          0xde5e81e4
-#define SYS_FS_MAGIC		0x62656572
+#define PSTOREFS_MAGIC          ((__SWORD_TYPE)0x6165676C)
+#define EFIVARFS_MAGIC          ((__SWORD_TYPE)0xde5e81e4)
+#define SYS_FS_MAGIC		((__SWORD_TYPE)0x62656572)
 
 /*
  *  fwts_uefi_get_interface()