zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Used-uninitalized error I hadn't seen before
Date: Sat, 08 Sep 2018 01:22:38 +0200	[thread overview]
Message-ID: <42391-1536362558.149296@9SUZ.DmAr.oCmA> (raw)
In-Reply-To: <CAH+w=7YxE5RxUHufvpTWdFP3imLgkuSSNK7erei3xrhcEeYhOQ@mail.gmail.com>

Bart wrote:
> Just built zsh 5.6 on a new host.

What compiler is this and what options? I don't get the warning with any
compiler I've got. It'd be useful to track down which uses of the
variable cause the warning.

> computil.c: In function 'ca_inactive':
> computil.c:1832: warning: 'grplen' may be used uninitialized in this function
>
> It's not immediately clear to me to what grplen should be initialized.

I'm fairly sure that it is wrong and grplen can't be used uninitialized.
The trouble with adding an initialisation to silence the warning is that
it wouldn't be a meaningful value. That can make the code harder to follow
later because someone reading the code might puzzle over that initial
value.

Oliver

  reply	other threads:[~2018-09-07 23:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 19:44 Bart Schaefer
2018-09-07 23:22 ` Oliver Kiddle [this message]
2018-09-07 23:51   ` Bart Schaefer

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=42391-1536362558.149296@9SUZ.DmAr.oCmA \
    --to=okiddle@yahoo.co.uk \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).