[PATCH] makedumpfile: Fix compile warning

Bernhard Walle bwalle at suse.de
Thu Jun 26 09:09:11 EDT 2008


This patch fixes following compile warning:

    makedumpfile.c: In function ‘readmem’:
    makedumpfile.c:207: warning: call to function \
            ‘vaddr_to_offset_x86_64’ without a real prototype
    makedumpfile.h:603: note: ‘vaddr_to_offset_x86_64’ was declared here


Signed-off-by: Bernhard Walle <bwalle at suse.de>

---
 makedumpfile.c |    4 ++++
 makedumpfile.h |   16 ++++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)

--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -30,6 +30,10 @@ struct DumpInfo		*info = NULL;
 int message_level;
 
 /*
+ * Forward declarations
+ */
+
+/*
  * The numbers of the excluded pages
  */
 unsigned long long pfn_zero;
--- a/makedumpfile.h
+++ b/makedumpfile.h
@@ -591,32 +591,32 @@ do { \
  * The function of dependence on machine
  */
 #ifdef __x86__
-int get_machdep_info_x86();
+int get_machdep_info_x86(void);
 #define get_phys_base(X)	TRUE
 #define get_machdep_info(X)	get_machdep_info_x86(X)
 #define vaddr_to_offset(X)	vaddr_to_offset_general(X)
 #endif /* x86 */
 
 #ifdef __x86_64__
-int get_phys_base_x86_64();
-int get_machdep_info_x86_64();
-off_t vaddr_to_offset_x86_64();
+int get_phys_base_x86_64(void);
+int get_machdep_info_x86_64(void);
+off_t vaddr_to_offset_x86_64(unsigned long vaddr);
 #define get_phys_base(X)	get_phys_base_x86_64(X)
 #define get_machdep_info(X)	get_machdep_info_x86_64(X)
 #define vaddr_to_offset(X)	vaddr_to_offset_x86_64(X)
 #endif /* x86_64 */
 
 #ifdef __powerpc__ /* powerpc */
-int get_machdep_info_ppc64();
+int get_machdep_info_ppc64(void);
 #define get_machdep_info(X)	get_machdep_info_ppc64(X)
 #define get_phys_base(X)	TRUE
 #define vaddr_to_offset(X)	vaddr_to_offset_general(X)
 #endif          /* powerpc */
 
 #ifdef __ia64__ /* ia64 */
-int get_phys_base_ia64();
-int get_machdep_info_ia64();
-off_t vaddr_to_offset_ia64();
+int get_phys_base_ia64(void);
+int get_machdep_info_ia64(void);
+off_t vaddr_to_offset_ia64(unsigned long vaddr);
 #define get_machdep_info(X)	get_machdep_info_ia64(X)
 #define get_phys_base(X)	get_phys_base_ia64(X)
 #define vaddr_to_offset(X)	vaddr_to_offset_ia64(X)



More information about the kexec mailing list