Skip to contentSkip to conversation

makedumpfile: Fix compile warning

PATCH In review Bernhard Walle 2 participants 2 messages Jun 26, 2008 – Jun 27, 2008

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

PATCH 1/1 makedumpfile: Fix compile warning

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

---
 makedumpfile.c |    4 ++++
 makedumpfile.h |   16 ++++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)
makedumpfile.c +4 -0
@@ -30,6 +30,10 @@ struct DumpInfo		*info = NULL;
 int message_level;
 
 /*
+ * Forward declarations
+ */
+
+/*
  * The numbers of the excluded pages
  */
 unsigned long long pfn_zero;
makedumpfile.h +8 -8
@@ -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)

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

#1 lore raw

Hi Bernhard,

Thank you for the patch.
I will apply the patch to the next release.

Thanks
Ken'ichi Ohmichi

Quoted 62 lines · Bernhard Walle

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

---
 makedumpfile.c |    4 ++++
 makedumpfile.h |   16 ++++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)
makedumpfile.c +4 -0
@@ -30,6 +30,10 @@ struct DumpInfo		*info = NULL;
 int message_level;
 
 /*
+ * Forward declarations
+ */
+
+/*
  * The numbers of the excluded pages
  */
 unsigned long long pfn_zero;
makedumpfile.h +5 -5
@@ -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 */
 

makedumpfile.h do { \ · line 622

Quoted 10 lines
makedumpfile.h +3 -3
 #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)

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