linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][PPC32] Fix several warnings
@ 2004-10-04 23:55 Matt Porter
  0 siblings, 0 replies; only message in thread
From: Matt Porter @ 2004-10-04 23:55 UTC (permalink / raw)
  To: akpm; +Cc: linuxppc-dev, linux-kernel

Fixes some annoying warnings due to unitialized variables.
Please apply.

Signed-off-by: Matt Porter <mporter@kernel.crashing.org>

===== arch/ppc/kernel/signal.c 1.37 vs edited =====
--- 1.37/arch/ppc/kernel/signal.c	2004-08-25 10:13:41 -07:00
+++ edited/arch/ppc/kernel/signal.c	2004-10-04 16:38:12 -07:00
@@ -270,7 +270,7 @@
 static int
 restore_user_regs(struct pt_regs *regs, struct mcontext __user *sr, int sig)
 {
-	unsigned long save_r2;
+	unsigned long save_r2 = 0;
 #if defined(CONFIG_ALTIVEC) || defined(CONFIG_SPE)
 	unsigned long msr;
 #endif
===== arch/ppc/mm/44x_mmu.c 1.4 vs edited =====
--- 1.4/arch/ppc/mm/44x_mmu.c	2004-08-07 11:05:38 -07:00
+++ edited/arch/ppc/mm/44x_mmu.c	2004-10-04 16:38:13 -07:00
@@ -72,7 +72,7 @@
 static void __init
 ppc44x_pin_tlb(int slot, unsigned int virt, unsigned int phys)
 {
-	unsigned long attrib;
+	unsigned long attrib = 0;
 
 	__asm__ __volatile__("\
 	clrrwi	%2,%2,10\n\
===== arch/ppc/syslib/ppc4xx_pic.c 1.11 vs edited =====
--- 1.11/arch/ppc/syslib/ppc4xx_pic.c	2004-07-01 22:23:47 -07:00
+++ edited/arch/ppc/syslib/ppc4xx_pic.c	2004-10-04 07:14:09 -07:00
@@ -256,7 +256,7 @@
 ppc4xx_uic_end(unsigned int irq)
 {
 	int bit, word;
-	unsigned int tr_bits;
+	unsigned int tr_bits = 0;
 
 	bit = irq & 0x1f;
 	word = irq >> 5;
===== arch/ppc/syslib/todc_time.c 1.9 vs edited =====
--- 1.9/arch/ppc/syslib/todc_time.c	2004-03-02 11:54:26 -07:00
+++ edited/arch/ppc/syslib/todc_time.c	2004-10-04 16:38:14 -07:00
@@ -277,9 +277,9 @@
 ulong
 todc_get_rtc_time(void)
 {
-	uint	year, mon, day, hour, min, sec;
+	uint	year = 0, mon = 0, day = 0, hour = 0, min = 0, sec = 0;
 	uint	limit, i;
-	u_char	save_control, uip;
+	u_char	save_control, uip = 0;
 
 	spin_lock(&rtc_lock);
 	save_control = todc_read_val(todc_info->control_a);
@@ -361,7 +361,7 @@
 todc_set_rtc_time(unsigned long nowtime)
 {
 	struct rtc_time	tm;
-	u_char		save_control, save_freq_select;
+	u_char		save_control, save_freq_select = 0;
 
 	spin_lock(&rtc_lock);
 	to_tm(nowtime, &tm);
@@ -416,7 +416,7 @@
  */
 static unsigned char __init todc_read_timereg(int addr)
 {
-	unsigned char save_control, val;
+	unsigned char save_control = 0, val;
 
 	switch (todc_info->rtc_type) {
 		case TODC_TYPE_DS1557:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-04 23:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-04 23:55 [PATCH][PPC32] Fix several warnings Matt Porter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).