Skip to contentSkip to conversation

Silence 'may be used uninitialized' warning in net/sunrpc/svc.c.

PATCH New Tony Breeds 1 participant 1 message Apr 24, 2008

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

PATCH 1/1 Silence 'may be used uninitialized' warning in net/sunrpc/svc.c.

Current kernels warn about:
net/sunrpc/svc.c: In function '__svc_create_thread':
net/sunrpc/svc.c:593: warning: 'oldmask.bits[0u]' may be used uninitialized in this function

As far as I can see oldmask will be initialised to something in each case it's used.

---
 net/sunrpc/svc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sunrpc/svc.c +1 -1
index 090af78..0e75a43 100644
@@ -590,7 +590,7 @@ __svc_create_thread(svc_thread_fn func, struct svc_serv *serv,
 	struct svc_rqst	*rqstp;
 	int		error = -ENOMEM;
 	int		have_oldmask = 0;
-	cpumask_t	oldmask;
+	cpumask_t	uninitialized_var(oldmask);
 
 	rqstp = svc_prepare_thread(serv, pool);
 	if (IS_ERR(rqstp)) {
Signature · 7 lines
1.5.5.1


Yours Tony

  linux.conf.au    http://www.marchsouth.org/
  Jan 19 - 24 2009 The Australian Linux Technical Conference!