sched.c: Remove unused variable 'relative'
Subsystems (9)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Linux Kernel Mailing List
Committer: Linus Torvalds <[email protected]> CommitDate: Sat Apr 7 10:18:33 2007 -0700
sched.c: Remove unused variable 'relative'Getting rid of the
p->childrenprintout inshow_task()left behind an unused variable.
grumble. The warning drowned in the usual flood of gcc warnings that a kernel compile produces. Btw., whenever i meet a gcc false positive that annoys me particularly, i just fix it up and flame the gcc folks in a comment. That patch has grown quite a bit and can be found below. (it's not complete by any means, and it should rather be done as an annotation combined with some unflattering CONFIG_HACK_AROUND_BROKEN_GCC_WARNINGS option that a sane compiler could unset and avoid the runtime cost of needless initializations.)
Ingo
----------->
arch/i386/kernel/cpu/mcheck/p4.c | 2 +- arch/i386/kernel/efi.c | 2 +- fs/block_dev.c | 2 +- fs/isofs/namei.c | 2 +- fs/jffs2/erase.c | 2 +- fs/nfsd/nfsctl.c | 2 +- ipc/msg.c | 2 +- ipc/sem.c | 2 +- kernel/audit.c | 2 +- kernel/auditfilter.c | 2 +- net/core/flow.c | 2 +- net/sunrpc/svc.c | 2 +- sound/core/control_compat.c | 2 +- sound/pci/pcxhr/pcxhr.c | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-)
arch/i386/kernel/cpu/mcheck/p4.c +1 -1
@@ -155,7 +155,7 @@ static fastcall void intel_machine_checku32 alow, ahigh, high, low;u32 mcgstl, mcgsth;int i; -struct intel_mce_extended_msrs dbg; +struct intel_mce_extended_msrs dbg = {0 , }/* shut up gcc! */ ;rdmsr (MSR_IA32_MCG_STATUS , mcgstl, mcgsth);if (mcgstl & (1 <<0 ))/* Recoverable ? */
arch/i386/kernel/efi.c +1 -1
@@ -278,7 +278,7 @@ void efi_memmap_walk(efi_freemem_callbacstruct range {unsigned long start;unsigned long end; - } prev, curr; + } prev = { }/* shut up gcc */ , curr = { }/* shut up gcc */ ;efi_memory_desc_t *md;unsigned long start, end;void *p;
fs/block_dev.c +1 -1
@@ -950,7 +950,7 @@ static int bd_claim_by_kobject(struct bl struct kobject *kobj) {int res; -struct bd_holder *bo, *found; +struct bd_holder *bo, *found =NULL /* shut up GCC */ ;if (!kobj)return -EINVAL ;
fs/isofs/namei.c +1 -1
@@ -158,7 +158,7 @@ isofs_find_entry(struct inode *dir, strustruct dentry *isofs_lookup (struct inode * dir,struct dentry * dentry,struct nameidata *nd) {int found; -unsigned long block, offset; +unsigned long block =0 , offset =0 /* avoid stupid gcc warning */ ;struct inode *inode;struct page *page;
fs/jffs2/erase.c +1 -1
@@ -364,7 +364,7 @@ static void jffs2_mark_erased_block(stru {size_t retlen;int ret; -uint32_t bad_offset; +uint32_t bad_offset =0 /* shut up gcc */ ;switch (jffs2_block_check_erase (c, jeb, &bad_offset)) {case -EAGAIN : goto refile;
fs/nfsd/nfsctl.c +1 -1
@@ -299,7 +299,7 @@ static ssize_t write_filehandle(struct f* qword quoting is used, so filehandle will be \x.... */ char *dname, *path; -int maxsize; +int maxsize =0 ;char *mesg = buf;int len;struct auth_domain *dom;
ipc/msg.c +1 -1
@@ -387,7 +387,7 @@ copy_msqid_from_user(struct msq_setbuf *asmlinkage long sys_msgctl (int msqid,int cmd,struct msqid_ds __user *buf) {struct kern_ipc_perm *ipcp; -struct msq_setbuf setbuf; +struct msq_setbuf setbuf = {/* shut up gcc warning */ };struct msg_queue *msq;int err, version;struct ipc_namespace *ns;
ipc/sem.c +1 -1
@@ -859,7 +859,7 @@ static int semctl_down(struct ipc_namesp {struct sem_array *sma;int err; -struct sem_setbuf setbuf; +struct sem_setbuf setbuf = {/* shut up gcc warning */ };struct kern_ipc_perm *ipcp;if (cmd ==IPC_SET ) {
kernel/audit.c +1 -1
@@ -969,7 +969,7 @@ struct audit_buffer *audit_log_start(str {struct audit_buffer *ab =NULL ;struct timespec t; -unsigned int serial; +unsigned int serial =0 /* shut up gcc */ ;int reserve;unsigned long timeout_start = jiffies;
kernel/auditfilter.c +1 -1
@@ -1168,7 +1168,7 @@ static inline int audit_add_rule(structstruct audit_entry *e;struct audit_field *inode_f = entry->rule.inode_f;struct audit_watch *watch = entry->rule.watch; -struct nameidata *ndp, *ndw; +struct nameidata *ndp =NULL , *ndw =NULL /* shut up gcc */ ;int h, err, putnd_needed =0 ;#ifdef CONFIG_AUDITSYSCALL int dont_count =0 ;
net/core/flow.c +1 -1
@@ -172,7 +172,7 @@ static int flow_key_compare(struct flowivoid *flow_cache_lookup (struct flowi *key,u16 family,u8 dir,flow_resolve_t resolver) { -struct flow_cache_entry *fle, **head; +struct flow_cache_entry *fle, **head =NULL /* shut up GCC */ ;unsigned int hash;int cpu;
net/sunrpc/svc.c +1 -1
@@ -547,7 +547,7 @@ __svc_create_thread(svc_thread_fn func,struct svc_rqst *rqstp;int error = -ENOMEM ;int have_oldmask =0 ; -cpumask_t oldmask; +cpumask_t oldmask =CPU_MASK_NONE /* shut up GCC */ ; rqstp =kzalloc (sizeof (*rqstp),GFP_KERNEL );if (!rqstp)
sound/core/control_compat.c +1 -1
@@ -219,7 +219,7 @@ static int copy_ctl_value_from_user(strustruct snd_ctl_elem_value32 __user *data32, int *typep, int *countp) { - int i, type, count, size; + int i, type, count = 0 /* shut up gcc warning */, size;unsigned int indirect;if (copy_from_user (&data->id, &data32->id,sizeof (data->id)))
sound/pci/pcxhr/pcxhr.c +1 -1
@@ -637,7 +637,7 @@ static void pcxhr_trigger_tasklet(unsign*/ static int pcxhr_trigger (struct snd_pcm_substream *subs,int cmd) { -struct pcxhr_stream *stream; +struct pcxhr_stream *stream =NULL /* shut up gcc */ ;struct list_head *pos;struct snd_pcm_substream *s;int i;