Skip to contentSkip to conversation

Warning fixes for 2.4.5-ac6

PATCH New Rich Baum 1 participant 1 message Jun 1, 2001

Subsystems (10)
lore
Share & tools
lore

Rich Baum

author
#0 lore raw

PATCH 1/1 Warning fixes for 2.4.5-ac6

Here is a patch that fixes warnings in 2.4.5-ac6. The patch for the Makefile removes warnings about the use of trigraphs. To me, this seems better than having to put backslashes before a question mark when you are printing out 2 or more in a row. The fpu_trig.c patch is mentioned in the log for 2.4.4-ac18 but was not included. Let me know if you have any problems.

Rich

Makefile +1 -3
diff -urN -X dontdiff linux/Makefile rb/Makefile
@@ -94,7 +94,7 @@
 
 CPPFLAGS := -D__KERNEL__ -I$(HPATH)
 
-CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer 
-fno-strict-aliasing
+CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 
-fomit-frame-pointer -fno-strict-aliasing
 AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)

#
diff -urN -X dontdiff linux/arch/i386/math-emu/fpu_trig.c rb/arch/i386/math-emu/fpu_trig.c

arch/i386/math-emu/fpu_trig.c +1 -0
@@ -1543,6 +1543,7 @@
 	  EXCEPTION(EX_INTERNAL | 0x116);
 	  return;
 #endif /* PARANOID */
+	  break;
 	}
     }
   else if ( (st0_tag == TAG_Valid) || (st0_tag == TW_Denormal) )
drivers/atm/fore200e.c +1 -0
diff -urN -X dontdiff linux/drivers/atm/fore200e.c rb/drivers/atm/fore200e.c
@@ -439,6 +439,7 @@
 
     case FORE200E_STATE_BLANK:
 	/* nothing to do for that state */
+	break;
     }
 }
 

diff -urN -X dontdiff linux/drivers/media/video/tuner.c rb/drivers/media/video/tuner.c

drivers/media/video/tuner.c +1 -0
@@ -558,6 +558,7 @@
 #endif
 	default:
 		/* nothing */
+		break;
 	}
 	
 	return 0;

diff -urN -X dontdiff linux/drivers/media/video/zr36067.c rb/drivers/media/video/zr36067.c

drivers/media/video/zr36067.c +1 -0
@@ -1411,6 +1411,7 @@
 		post_office_write(zr, 3, 0, 0);
 		udelay(2);
 	default:
+		break;
 	}
 	return 0;
 }
drivers/net/wan/hdlc.c +3 -2
diff -urN -X dontdiff linux/drivers/net/wan/hdlc.c rb/drivers/net/wan/hdlc.c
@@ -1080,9 +1080,10 @@
 					       result);
 				}
 			}
-			break;
 
-		default:		/* to be defined */
+		default:
+			/* to be defined */
+			break;
 		}
 
 		dev_kfree_skb(skb);

diff -urN -X dontdiff linux/drivers/net/wan/sdla_fr.c rb/drivers/net/wan/sdla_fr.c

drivers/net/wan/sdla_fr.c +2 -2
@@ -4434,8 +4434,8 @@
 		chan->inarp = INARP_CONFIGURED;
 		trigger_fr_poll(dev);
 		
-		break;
-	default:  // ARP's and RARP's -- Shouldn't happen.
+	default:  
+		break; // ARP's and RARP's -- Shouldn't happen.
 	}
 
 	return 0;	

diff -urN -X dontdiff linux/drivers/scsi/sym53c8xx.c rb/drivers/scsi/sym53c8xx.c

drivers/scsi/sym53c8xx.c +1 -1
@@ -11571,8 +11571,8 @@
 	return;
 out_clrack:
 	OUTL_DSP (NCB_SCRIPT_PHYS (np, clrack));
-	return;
 out_stuck:
+	return;
 }
 
 

diff -urN -X dontdiff linux/drivers/sound/gus_wave.c rb/drivers/sound/gus_wave.c

drivers/sound/gus_wave.c +3 -0
@@ -2102,6 +2102,7 @@
 			break;
 
 		default:
+			break;
 	}
 }
 
@@ -3282,6 +3283,7 @@
 		break;
 
 		default:
+			break;
 	}
 	restore_flags(flags);
 }
@@ -3423,6 +3425,7 @@
 				break;
 
 			default:
+				break;
 	}
 	status = gus_look8(0x49);	/*
 					 * Get Sampling IRQ Status
drivers/sound/pss.c +1 -0
diff -urN -X dontdiff linux/drivers/sound/pss.c rb/drivers/sound/pss.c
@@ -766,6 +766,7 @@
 			break;
 
 		default:
+			break;
 	}
 	return 0;
 }
drivers/sound/wf_midi.c +1 -0
diff -urN -X dontdiff linux/drivers/sound/wf_midi.c rb/drivers/sound/wf_midi.c
@@ -231,6 +231,7 @@
 				break;
 		    
 			default:
+				break;
 			}
 		} else {
 			mi->m_prev_status = midic;
drivers/sound/ymfpci.c +1 -0
diff -urN -X dontdiff linux/drivers/sound/ymfpci.c rb/drivers/sound/ymfpci.c
@@ -1856,6 +1856,7 @@
 		 * for instance we get SNDCTL_TMR_CONTINUE here.
 		 * XXX Is there sound_generic_ioctl() around?
 		 */
+		 break;
 	}
 	return -ENOTTY;
 }
fs/ntfs/fs.c +1 -1
diff -urN -X dontdiff linux/fs/ntfs/fs.c rb/fs/ntfs/fs.c
@@ -836,7 +836,7 @@
 			goto unl_out;
 		} /* Do the default for ngt_full. */
 	default:
-		/* Nothing. Just clear the inode and exit. */
+		break;	/* Nothing. Just clear the inode and exit. */
 	}
 	ntfs_clear_inode(&inode->u.ntfs_i);
 unl_out:
fs/sysv/inode.c +0 -0
diff -urN -X dontdiff linux/fs/sysv/inode.c rb/fs/sysv/inode.c
@@ -442,7 +442,7 @@
 			brelse(bh);
 			printk("SysV FS: cannot read superblock in %d byte mode\n", 

sb->sv_block_size);
goto failed;
- superblock_ok:
+ superblock_ok:;
}
} else {
/* Switch to 512 block size. Unfortunately, we have to
diff -urN -X dontdiff linux/net/ipv4/netfilter/ipfwadm_core.c rb/net/ipv4/netfilter/ipfwadm_core.c

net/ipv4/netfilter/ipfwadm_core.c +1 -1
@@ -515,7 +515,7 @@
 			}
 			continue;	/* Mismatch */
 
-		ifa_ok:
+		ifa_ok:;
 		}
 
 		/*

diff -urN -X dontdiff linux/net/ipv4/netfilter/ipt_REJECT.c rb/net/ipv4/netfilter/ipt_REJECT.c

net/ipv4/netfilter/ipt_REJECT.c +1 -1
@@ -309,9 +309,9 @@
     		break;
 	case IPT_TCP_RESET:
 		send_reset(*pskb, hooknum == NF_IP_LOCAL_IN);
-		break;
 	case IPT_ICMP_ECHOREPLY:
 		/* Doesn't happen. */
+		break;
 	}
 
 	return NF_DROP;
net/khttpd/security.h +2 -1
diff -urN -X dontdiff linux/net/khttpd/security.h rb/net/khttpd/security.h
@@ -9,4 +9,5 @@
 	char value[32-sizeof(void*)];  /* fill 1 cache-line */
 };
 
-#endif
\ No newline at end of file
+#endif
+
net/sched/sch_cbq.c +1 -0
diff -urN -X dontdiff linux/net/sched/sch_cbq.c rb/net/sched/sch_cbq.c
@@ -282,6 +282,7 @@
 		case TC_POLICE_SHOT:
 			return NULL;
 		default:
+			break;
 		}
 #endif
 		if (cl->level == 0)