974b936917
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/efivar#9f54d8029387895b7b1389d9a9f9e0bf476a027f
46 lines
1.8 KiB
Diff
46 lines
1.8 KiB
Diff
From 3cf3b3d5cf3f6ff7ddb315676e338a0632aa6dc8 Mon Sep 17 00:00:00 2001
|
|
From: Chih-Wei Huang <cwhuang@linux.org.tw>
|
|
Date: Wed, 22 Jan 2020 12:19:35 +0800
|
|
Subject: [PATCH 68/86] Fix an argument mismatch error
|
|
|
|
MSDOS_MBR_MAGIC is an int, no need to specify the 'h' (unsigned short)
|
|
modifier. This avoids the error (built with clang):
|
|
|
|
external/efivar/src/disk.c:59:18: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat]
|
|
mbr->magic, MSDOS_MBR_MAGIC);
|
|
^~~~~~~~~~~~~~~
|
|
external/efivar/src/include/efivar/efivar.h:244:66: note: expanded from macro 'efi_error'
|
|
efi_error_real__(errno, __FILE__, __func__, __LINE__, (fmt), ## args)
|
|
^~~~
|
|
external/efivar/src/include/efivar/efivar.h:241:56: note: expanded from macro 'efi_error_real__'
|
|
efi_error_set(file, function, line, errval, (fmt), ## args)
|
|
^~~~
|
|
external/efivar/src/gpt.h:32:25: note: expanded from macro 'MSDOS_MBR_MAGIC'
|
|
#define MSDOS_MBR_MAGIC 0xaa55
|
|
^~~~~~
|
|
1 error generated.
|
|
|
|
Fixes: 038afd7a ("Always refer to MBR and GPT fixed values as 'magic' not 'signature'")
|
|
|
|
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
|
|
---
|
|
src/disk.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/disk.c b/src/disk.c
|
|
index 3b5bf8330b1..2eaf57436a2 100644
|
|
--- a/src/disk.c
|
|
+++ b/src/disk.c
|
|
@@ -55,7 +55,7 @@ is_mbr_valid(legacy_mbr *mbr)
|
|
ret = (mbr->magic == MSDOS_MBR_MAGIC);
|
|
if (!ret) {
|
|
errno = ENOTTY;
|
|
- efi_error("mbr magic is 0x%04hx not MSDOS_MBR_MAGIC (0x%04hx)",
|
|
+ efi_error("mbr magic is 0x%04hx not MSDOS_MBR_MAGIC (0x%04x)",
|
|
mbr->magic, MSDOS_MBR_MAGIC);
|
|
}
|
|
return ret;
|
|
--
|
|
2.24.1
|
|
|