All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: outreachy-kernel <outreachy-kernel@googlegroups.com>
Cc: gregkh@linuxfoundation.org, julia.lawall@inria.fr
Subject: Variables defined, (sometimes) assigned, and never used
Date: Fri, 09 Apr 2021 22:09:23 +0200	[thread overview]
Message-ID: <3125862.SBIft5tIRe@localhost.localdomain> (raw)

When compiling with flag W=1 a lot of warnings about variables defined but 
never used show up. If one read the source sometimes it's clear that the 
original author placed them there because she/he wants to use the variable 
for doing something in a future release of the driver. I've also seen a 
comment like /* TODO */ near some unused variables. 

I thought to delete a couple of variables that are declared, may be also 
assigned as a result of some expression, but neither  used within a 
function or returned to the caller.

What to do with those (currently) unnecessary variables? Should we remove 
them or let everything as is?

Thanks,

Fabio
 

  




             reply	other threads:[~2021-04-09 20:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09 20:09 Fabio M. De Francesco [this message]
2021-04-09 20:14 ` Variables defined, (sometimes) assigned, and never used Julia Lawall
2021-04-09 20:26   ` Fabio M. De Francesco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3125862.SBIft5tIRe@localhost.localdomain \
    --to=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@inria.fr \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.