Skip to contentSkip to conversation

configure.ac: apply necessary quotes to result of macro expansion.

PATCH In review Yousong Zhou 2 participants 5 messages Feb 10, 2015 – Feb 12, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 configure.ac: apply necessary quotes to result of macro expansion.

This can fix the following error when searching for lzma support and while at it also apply the practice to other uses of the same pattern.

checking for lzma_code in -llzma... ./configure: line 4756: ac_fn_c_try_link: command not found

---
 configure.ac |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
configure.ac +6 -6
index db93331..c410e90 100644
@@ -152,22 +152,22 @@ AC_CHECK_PROG([DIRNAME],  dirname,  dirname,  "no", [$PATH])
 dnl See if I have a usable copy of zlib available
 if test "$with_zlib" = yes ; then
 	AC_CHECK_HEADER(zlib.h,
-		AC_CHECK_LIB(z, inflateInit_, ,
-		AC_MSG_NOTICE([zlib support disabled])))
+		[AC_CHECK_LIB(z, inflateInit_, ,
+		AC_MSG_NOTICE([zlib support disabled]))])
 fi
 
 dnl See if I have a usable copy of lzma available
 if test "$with_lzma" = yes ; then
 	AC_CHECK_HEADER(lzma.h,
-		AC_CHECK_LIB(lzma, lzma_code, ,
-		AC_MSG_NOTICE([lzma support disabled])))
+		[AC_CHECK_LIB(lzma, lzma_code, ,
+		AC_MSG_NOTICE([lzma support disabled]))])
 fi
 
 dnl find Xen control stack libraries
 if test "$with_xen" = yes ; then
 	AC_CHECK_HEADER(xenctrl.h,
-		AC_CHECK_LIB(xenctrl, xc_kexec_load, ,
-		AC_MSG_NOTICE([Xen support disabled])))
+		[AC_CHECK_LIB(xenctrl, xc_kexec_load, ,
+		AC_MSG_NOTICE([Xen support disabled]))])
 fi
 
 dnl ---Sanity checks
Signature · 7 lines
1.7.10.4


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw

PATCH 2/4 mips: fix compiler warning on printing 64-bit integer.

---
 kexec/arch/mips/crashdump-mips.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kexec/arch/mips/crashdump-mips.c +2 -1
index e7840e0..98c9f7c 100644
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <limits.h>
+#include <inttypes.h>
 #include <elf.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -52,7 +53,7 @@ static int get_kernel_paddr(struct crash_elf_info *elf_info)
 
 	if (parse_iomem_single("Kernel code\n", &start, NULL) == 0) {
 		elf_info->kern_paddr_start = start;
-		dbgprintf("kernel load physical addr start = 0x%lx\n", start);
+		dbgprintf("kernel load physical addr start = 0x%" PRIu64 "\n", start);
 		return 0;
 	}
 
Signature · 7 lines
1.7.10.4


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#2 lore raw

PATCH 3/4 mips: remove unused variable.

In reply to Yousong Zhou

Fixes the following compilation warning.

kexec/arch/mips/crashdump-mips.c:151:6: warning: unused variable 'i' [-Wunused-variable]

---
 kexec/arch/mips/crashdump-mips.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kexec/arch/mips/crashdump-mips.c +1 -1
index 98c9f7c..dc68cb4 100644
@@ -148,7 +148,7 @@ static int exclude_crash_reserve_region(int *nr_ranges)
 static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
 {
 	const char iomem[] = "/proc/iomem";
-	int i, memory_ranges = 0;
+	int memory_ranges = 0;
 	char line[MAX_LINE];
 	FILE *fp;
 	unsigned long long start, end;
Signature · 7 lines
1.7.10.4


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#3 lore raw

PATCH 4/4 mips: fix warning about implicit type conversion.

In reply to Yousong Zhou

Fixes the following warning.

kexec/arch/mips/kexec-elf-mips.c:161:16: warning: assignment makes integer from pointer without a cast [enabled by default]

---
 kexec/arch/mips/kexec-elf-mips.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kexec/arch/mips/kexec-elf-mips.c +1 -1
index a27d986..8a6419a 100644
@@ -158,7 +158,7 @@ int elf_mips_load(int argc, char **argv, const char *buf, off_t len,
 	if (info->kexec_flags & KEXEC_ON_CRASH)
 		/* In case of crashdump segment[0] is kernel.
 		 * Put cmdline just after it. */
-		cmdline_addr = info->segment[0].mem +
+		cmdline_addr = (unsigned long)info->segment[0].mem +
 				info->segment[0].memsz;
 	else
 		cmdline_addr = 0;
Signature · 7 lines
1.7.10.4


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#4 lore raw
In reply to Yousong Zhou
Quoted 4 lines · Yousong Zhou

This can fix the following error when searching for lzma support and while at it also apply the practice to other uses of the same pattern.

checking for lzma_code in -llzma... ./configure: line 4756: ac_fn_c_try_link: command not found

Thanks, I have applied this and the other three patches in the series.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec