[PATCH] Fix compiler warnings on s390(x)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave!

This patch fixes all warnings (gcc 4.1.0) on s390 and s390x.
This allows us to build crash with "make Warn" now.

Michael

---

 defs.h    |    2 +
 kernel.c  |    9 +++---
 s390.c    |   51 ++++++++++++++++++--------------------
 s390dbf.c |    2 -
 s390x.c   |   83 +++++++++++++++++++++++++++++++-------------------------------
 5 files changed, 75 insertions(+), 72 deletions(-)

diff -Naur crash-4.0-3.1/defs.h crash-4.0-3.1-fix-warn/defs.h
--- crash-4.0-3.1/defs.h	2006-08-14 18:29:34.000000000 +0200
+++ crash-4.0-3.1-fix-warn/defs.h	2006-08-14 18:32:01.000000000 +0200
@@ -3715,6 +3715,7 @@
 #ifdef S390 
 void s390_init(int);
 void s390_dump_machdep_table(ulong);
+int s390_IS_VMALLOC_ADDR(ulong addr);
 #define display_idt_table() \
         error(FATAL, "-d option is not applicable to S390 architecture\n")
 #define KSYMS_START (0x1)
@@ -3740,6 +3741,7 @@
 #ifdef S390X
 void s390x_init(int);
 void s390x_dump_machdep_table(ulong);
+int s390x_IS_VMALLOC_ADDR(ulong addr);
 #define display_idt_table() \
         error(FATAL, "-d option is not applicable to S390X architecture\n")
 #define KSYMS_START (0x1)
diff -Naur crash-4.0-3.1/kernel.c crash-4.0-3.1-fix-warn/kernel.c
--- crash-4.0-3.1/kernel.c	2006-08-04 17:24:00.000000000 +0200
+++ crash-4.0-3.1-fix-warn/kernel.c	2006-08-14 18:35:25.000000000 +0200
@@ -1937,8 +1937,8 @@
 					return;
 				}
 
-				if (IS_VMALLOC_ADDR(list.next) &&
-				    IS_VMALLOC_ADDR(list.prev)) {
+				if (IS_VMALLOC_ADDR((ulong)list.next) &&
+				    IS_VMALLOC_ADDR((ulong)list.prev)) {
 					kt->kernel_module = sp->value;
 					kt->module_list = (ulong)list.next;
 					modules_found = TRUE;
@@ -3231,7 +3231,8 @@
 					"%3x  " : "%3d  ", i);
 				fprintf(fp, 
 			    	    "invalid sys_call_table entry: %lx (%s)\n", 
-					*sct, value_to_symstr(*sct, buf1, 0));
+					(unsigned long)*sct,
+					value_to_symstr(*sct, buf1, 0));
 			}
 			continue;
 		}
@@ -5161,7 +5162,7 @@
 	stream.next_in = (Bytef *)head;
 	stream.avail_in = (uInt)bufsz;
 
-	stream.next_out = uncomp;
+	stream.next_out = (Bytef *)uncomp;
 	stream.avail_out = (uInt)size;
 
 	stream.zalloc = NULL;
diff -Naur crash-4.0-3.1/s390.c crash-4.0-3.1-fix-warn/s390.c
--- crash-4.0-3.1/s390.c	2006-08-04 17:24:00.000000000 +0200
+++ crash-4.0-3.1-fix-warn/s390.c	2006-08-14 18:45:37.000000000 +0200
@@ -86,7 +86,6 @@
 static ulong s390_processor_speed(void);
 static int s390_eframe_search(struct bt_info *);
 static void s390_back_trace_cmd(struct bt_info *);
-static void s390_back_trace(struct gnu_request *, struct bt_info *);
 static void s390_dump_irq(int);
 static void s390_get_stack_frame(struct bt_info *, ulong *, ulong *);
 static int s390_dis_filter(ulong, char *);
@@ -292,7 +291,7 @@
 /*
  * Check if page is mapped
  */
-inline int 
+static inline int 
 s390_pte_present(unsigned long x)
 {
 	if(THIS_KERNEL_VERSION >= LINUX(2,6,0)) {
@@ -482,7 +481,7 @@
 		return FALSE;
 	}
 	fprintf(fp,"PTE      PHYSICAL  FLAGS\n");
-	fprintf(fp,"%08x %08x",pte, pte & S390_PAGE_BASE_MASK);
+	fprintf(fp,"%08lx %08lx",pte, pte & S390_PAGE_BASE_MASK);
 	fprintf(fp,"  (");
 	if(pte & S390_PAGE_INVALID)
 		fprintf(fp,"INVALID ");
@@ -509,7 +508,7 @@
 /*
  * returns cpu number of task
  */ 
-int 
+static int 
 s390_cpu_of_task(unsigned long task)
 {
 	int cpu;
@@ -550,7 +549,7 @@
                         return FALSE;
         } else {
 		/* Linux 2.6 */
-		unsigned long runqueue_addr, runqueue_offset, per_cpu_offset;
+		unsigned long runqueue_addr, runqueue_offset;
 		unsigned long cpu_offset, per_cpu_offset_addr, running_task;
 		char runqueue[4096];
 		int cpu;
@@ -699,7 +698,7 @@
 		} else if(skip_first_frame){
 			skip_first_frame=0;
 		} else {
-			fprintf(fp," #%i [%08x] ",i,backchain);
+			fprintf(fp," #%i [%08lx] ",i,backchain);
 			fprintf(fp,"%s at %x\n", closest_symbol(r14), r14);
 			if (bt->flags & BT_LINE_NUMBERS)
 				s390_dump_line_number(r14);
@@ -721,9 +720,9 @@
 			}
 			for(j=0; j< frame_size; j+=4){
 				if(j % 16 == 0){
-					fprintf(fp,"\n%08x: ",old_backchain+j);
+					fprintf(fp,"\n%08lx: ",old_backchain+j);
 				}
-				fprintf(fp," %08x",ULONG(&stack[old_backchain -
+				fprintf(fp," %08lx",ULONG(&stack[old_backchain -
 							 stack_base + j]));
 			}
 			fprintf(fp,"\n\n");
@@ -772,10 +771,10 @@
 		return;
 	}
 	fprintf(fp," LOWCORE INFO:\n");
-	fprintf(fp,"  -psw      : %#010x %#010x\n", tmp[0],
+	fprintf(fp,"  -psw      : %#010lx %#010lx\n", tmp[0],
 		tmp[1]);
 	if(show_symbols){
-		fprintf(fp,"  -function : %s at %x\n", 
+		fprintf(fp,"  -function : %s at %lx\n", 
 	       		closest_symbol(tmp[1] & S390_ADDR_MASK), 
 			tmp[1] & S390_ADDR_MASK);
 		if (bt->flags & BT_LINE_NUMBERS)
@@ -784,12 +783,12 @@
 	ptr = lc + MEMBER_OFFSET("_lowcore","cpu_timer_save_area");
 	tmp[0]=UINT(ptr);
 	tmp[1]=UINT(ptr + S390_WORD_SIZE);
-	fprintf(fp,"  -cpu timer: %#010x %#010x\n", tmp[0],tmp[1]);
+	fprintf(fp,"  -cpu timer: %#010lx %#010lx\n", tmp[0],tmp[1]);
 
 	ptr = lc + MEMBER_OFFSET("_lowcore","clock_comp_save_area");
 	tmp[0]=UINT(ptr);
 	tmp[1]=UINT(ptr + S390_WORD_SIZE);
-	fprintf(fp,"  -clock cmp: %#010x %#010x\n", tmp[0], tmp[1]);
+	fprintf(fp,"  -clock cmp: %#010lx %#010lx\n", tmp[0], tmp[1]);
 
 	fprintf(fp,"  -general registers:\n");
 	ptr = lc + MEMBER_OFFSET("_lowcore","gpregs_save_area");
@@ -797,25 +796,25 @@
 	tmp[1]=ULONG(ptr + S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 2 * S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 3 * S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0],tmp[1],tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 4 * S390_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 5 * S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 6 * S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 7 * S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0],tmp[1],tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 8 * S390_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 9 * S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 10* S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 11* S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0],tmp[1],tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 12* S390_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 13* S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 14* S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 15* S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 
 	fprintf(fp,"  -access registers:\n");
@@ -824,25 +823,25 @@
 	tmp[1]=ULONG(ptr + S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 2 * S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 3 * S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 	tmp[0]=ULONG(ptr + 4 * S390_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 5 * S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 6 * S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 7 * S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 	tmp[0]=ULONG(ptr + 8 * S390_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 9 * S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 10* S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 11* S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 	tmp[0]=ULONG(ptr + 12* S390_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 13* S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 14* S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 15* S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 
 	fprintf(fp,"  -control registers:\n");
@@ -851,26 +850,26 @@
 	tmp[1]=ULONG(ptr + S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 2 * S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 3 * S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 	tmp[0]=ULONG(ptr + 4 * S390_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 5 * S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 6 * S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 7 * S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 
 	tmp[0]=ULONG(ptr);
 	tmp[1]=ULONG(ptr + S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 2 * S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 3 * S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 	tmp[0]=ULONG(ptr + 4 * S390_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 5 * S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 6 * S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 7 * S390_WORD_SIZE);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 
 	ptr = lc + MEMBER_OFFSET("_lowcore","floating_pt_save_area");
@@ -879,8 +878,8 @@
 	tmp[1]=ULONG(ptr + 2 * S390_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 4 * S390_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 6 * S390_WORD_SIZE);
-	fprintf(fp,"     %#018llx %#018llx\n", tmp[0], tmp[1]);
-	fprintf(fp,"     %#018llx %#018llx\n", tmp[2], tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0], tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2], tmp[3]);
 }
 
 /*
diff -Naur crash-4.0-3.1/s390dbf.c crash-4.0-3.1-fix-warn/s390dbf.c
--- crash-4.0-3.1/s390dbf.c	2006-08-14 18:29:34.000000000 +0200
+++ crash-4.0-3.1-fix-warn/s390dbf.c	2006-08-14 18:45:41.000000000 +0200
@@ -332,7 +332,7 @@
 		offset = caller - kl_funcaddr(caller);
 	}
 	else {
-		sprintf(caller_buf, "%"FMTPTR"x", caller);
+		sprintf(caller_buf, "%llx", (unsigned long long)caller);
 		caller_name = caller_buf;
 		offset = 0;
 	}
diff -Naur crash-4.0-3.1/s390x.c crash-4.0-3.1-fix-warn/s390x.c
--- crash-4.0-3.1/s390x.c	2006-08-04 17:24:00.000000000 +0200
+++ crash-4.0-3.1-fix-warn/s390x.c	2006-08-14 18:28:38.000000000 +0200
@@ -206,7 +206,8 @@
 	fprintf(fp, "                 hz: %d\n", machdep->hz);
 	fprintf(fp, "                mhz: %ld\n", machdep->mhz);
 	fprintf(fp, "            memsize: %lld (0x%llx)\n", 
-		machdep->memsize, machdep->memsize);
+		(unsigned long long)machdep->memsize,
+		(unsigned long long)machdep->memsize);
 	fprintf(fp, "               bits: %d\n", machdep->bits);
 	fprintf(fp, "            nr_irqs: %d\n", machdep->nr_irqs);
 	fprintf(fp, "      eframe_search: s390x_eframe_search()\n");
@@ -307,7 +308,7 @@
 /*
  * Check if page is mapped
  */
-inline int s390x_pte_present(unsigned long x){
+static inline int s390x_pte_present(unsigned long x){
 	if(THIS_KERNEL_VERSION >= LINUX(2,6,0)){
 		return !((x) & S390X_PAGE_INVALID) ||
 			((x) & S390X_PAGE_INVALID_MASK) == S390X_PAGE_INVALID_NONE;
@@ -513,7 +514,7 @@
 		return FALSE;
 	}
 	fprintf(fp,"PTE      PHYSICAL  FLAGS\n");
-	fprintf(fp,"%08x %08x",pte, pte & S390X_PAGE_BASE_MASK);
+	fprintf(fp,"%08lx %08llx",pte, pte & S390X_PAGE_BASE_MASK);
 	fprintf(fp,"  (");
 	if(pte & S390X_PAGE_INVALID)
 		fprintf(fp,"INVALID ");
@@ -540,7 +541,7 @@
 /*
  * returns cpu number of task
  */ 
-int 
+static int 
 s390x_cpu_of_task(unsigned long task)
 {
 	unsigned int cpu;
@@ -582,7 +583,7 @@
 			return FALSE;
 	} else {
 		/* Linux 2.6 */
-		unsigned long runqueue_addr, runqueue_offset, per_cpu_offset;
+		unsigned long runqueue_addr, runqueue_offset;
 		unsigned long cpu_offset, per_cpu_offset_addr, running_task;
 		char runqueue[4096];
 		int cpu;
@@ -732,7 +733,7 @@
 		} else if(skip_first_frame){
 			skip_first_frame=0;
 		} else {
-			fprintf(fp," #%i [%08x] ",i,backchain);
+			fprintf(fp," #%i [%08lx] ",i,backchain);
 			fprintf(fp,"%s at %x\n", closest_symbol(r14), r14);
 			if (bt->flags & BT_LINE_NUMBERS)
 				s390x_dump_line_number(r14);
@@ -754,9 +755,9 @@
 			}
 			for(j=0; j< frame_size; j+=4){
 				if(j % 16 == 0){
-					fprintf(fp,"\n%08x: ",old_backchain+j);
+					fprintf(fp,"\n%08lx: ",old_backchain+j);
 				}
-				fprintf(fp," %08x",ULONG(&stack[old_backchain -
+				fprintf(fp," %08lx",ULONG(&stack[old_backchain -
 							 stack_base + j]));
 			}
 			fprintf(fp,"\n\n");
@@ -805,26 +806,26 @@
 		return;
 	}
 	fprintf(fp," LOWCORE INFO:\n");
-	fprintf(fp,"  -psw      : %#018x %#018x\n", tmp[0], tmp[1]);
+	fprintf(fp,"  -psw      : %#018lx %#018lx\n", tmp[0], tmp[1]);
 	if(show_symbols){
-		fprintf(fp,"  -function : %s at %x\n", 
+		fprintf(fp,"  -function : %s at %lx\n", 
 			closest_symbol(tmp[1]), tmp[1]);
 		if (bt->flags & BT_LINE_NUMBERS)
 			s390x_dump_line_number(tmp[1]);
 	}
 	ptr = lc + MEMBER_OFFSET("_lowcore","prefixreg_save_area");
 	tmp[0] = UINT(ptr);
-	fprintf(fp,"  -prefix   : %#010x\n", tmp[0]);
+	fprintf(fp,"  -prefix   : %#010lx\n", tmp[0]);
 	
 	ptr = lc + MEMBER_OFFSET("_lowcore","cpu_timer_save_area");
 	tmp[0]=UINT(ptr);
 	tmp[1]=UINT(ptr + S390X_WORD_SIZE);
-	fprintf(fp,"  -cpu timer: %#010x %#010x\n", tmp[0],tmp[1]);
+	fprintf(fp,"  -cpu timer: %#010lx %#010lx\n", tmp[0],tmp[1]);
 
 	ptr = lc + MEMBER_OFFSET("_lowcore","clock_comp_save_area");
 	tmp[0]=UINT(ptr);
 	tmp[1]=UINT(ptr + S390X_WORD_SIZE);
-	fprintf(fp,"  -clock cmp: %#010x %#010x\n", tmp[0], tmp[1]);
+	fprintf(fp,"  -clock cmp: %#010lx %#010lx\n", tmp[0], tmp[1]);
 
 	fprintf(fp,"  -general registers:\n");
 	ptr = lc + MEMBER_OFFSET("_lowcore","gpregs_save_area");
@@ -832,26 +833,26 @@
 	tmp[1]=ULONG(ptr + S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 2 * S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 3 * S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 4 * S390X_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 5 * S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 6 * S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 7 * S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 8 * S390X_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 9 * S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 10* S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 11* S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 12* S390X_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 13* S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 14* S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 15* S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 
 	fprintf(fp,"  -access registers:\n");
 	ptr = lc + MEMBER_OFFSET("_lowcore","access_regs_save_area");
@@ -859,25 +860,25 @@
 	tmp[1]=ULONG(ptr + 4);
 	tmp[2]=ULONG(ptr + 2 * 4);
 	tmp[3]=ULONG(ptr + 3 * 4);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 	tmp[0]=ULONG(ptr + 4 * 4);
 	tmp[1]=ULONG(ptr + 5 * 4);
 	tmp[2]=ULONG(ptr + 6 * 4);
 	tmp[3]=ULONG(ptr + 7 * 4);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 	tmp[0]=ULONG(ptr + 8 * 4);
 	tmp[1]=ULONG(ptr + 9 * 4);
 	tmp[2]=ULONG(ptr + 10* 4);
 	tmp[3]=ULONG(ptr + 11* 4);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 	tmp[0]=ULONG(ptr + 12* 4);
 	tmp[1]=ULONG(ptr + 13* 4);
 	tmp[2]=ULONG(ptr + 14* 4);
 	tmp[3]=ULONG(ptr + 15* 4);
-	fprintf(fp,"     %#010x %#010x %#010x %#010x\n", 
+	fprintf(fp,"     %#010lx %#010lx %#010lx %#010lx\n", 
 		tmp[0], tmp[1], tmp[2], tmp[3]);
 
 	fprintf(fp,"  -control registers:\n");
@@ -886,26 +887,26 @@
 	tmp[1]=ULONG(ptr + S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 2 * S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 3 * S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 4 * S390X_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 5 * S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 6 * S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 7 * S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr);
 	tmp[1]=ULONG(ptr + S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 2 * S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 3 * S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 4 * S390X_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 5 * S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 6 * S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 7 * S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 
 	ptr = lc + MEMBER_OFFSET("_lowcore","floating_pt_save_area");
 	fprintf(fp,"  -floating point registers 0,2,4,6:\n");
@@ -913,26 +914,26 @@
 	tmp[1]=ULONG(ptr +  S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 2 * S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 3 * S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 4 * S390X_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 5 * S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 6 * S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 7 * S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 6 * S390X_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 7 * S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 8 * S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 9 * S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 	tmp[0]=ULONG(ptr + 10* S390X_WORD_SIZE);
 	tmp[1]=ULONG(ptr + 11* S390X_WORD_SIZE);
 	tmp[2]=ULONG(ptr + 12* S390X_WORD_SIZE);
 	tmp[3]=ULONG(ptr + 13* S390X_WORD_SIZE);
-	fprintf(fp,"     %#018x %#018x\n", tmp[0],tmp[1]);
-	fprintf(fp,"     %#018x %#018x\n", tmp[2],tmp[3]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[0],tmp[1]);
+	fprintf(fp,"     %#018lx %#018lx\n", tmp[2],tmp[3]);
 }
 
 /*

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux