public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks•im>
To: Mike Hommey <mh@glandium•org>
Cc: git@vger•kernel.org, gitster@pobox•com
Subject: Re: [PATCH 1/4] Fix maybe-uninitialized warning with GCC at -O3
Date: Wed, 4 Jun 2025 09:36:03 +0200	[thread overview]
Message-ID: <aD_3Y0PQtfg8Dd9z@pks.im> (raw)
In-Reply-To: <20250603230646.2322671-1-mh@glandium.org>

On Wed, Jun 04, 2025 at 08:06:43AM +0900, Mike Hommey wrote:
> ```
> In file included from parse-options.c:1:
> git-compat-util.h: In function ‘get_value’:
> git-compat-util.h:489:21: error: ‘arg’ may be used uninitialized [-Werror=maybe-uninitialized]
>   489 | #define error(...) (error(__VA_ARGS__), const_error())
>       |                     ^~~~~
> parse-options.c:76:21: note: ‘arg’ was declared here
>    76 |         const char *arg;
>       |                     ^~~
> ```

A bit more explanation whether this warning is a false positive or
whether this may be an actual issue would be welcome.

Patrick

  parent reply	other threads:[~2025-06-04  7:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-03 23:06 [PATCH 1/4] Fix maybe-uninitialized warning with GCC at -O3 Mike Hommey
2025-06-03 23:06 ` [PATCH 2/4] Fix use-after-free " Mike Hommey
2025-06-03 23:47   ` Junio C Hamano
2025-06-04  7:36   ` Patrick Steinhardt
2025-06-03 23:06 ` [PATCH 3/4] Fix comma warnings with clang on Windows Mike Hommey
2025-06-03 23:51   ` Junio C Hamano
2025-06-03 23:06 ` [PATCH 4/4] Fix unreachable-code warning " Mike Hommey
2025-06-04  7:36   ` Patrick Steinhardt
2025-06-04 15:50     ` Junio C Hamano
2025-06-04  7:36 ` Patrick Steinhardt [this message]
2025-06-06  0:23   ` [PATCH 1/4] Fix maybe-uninitialized warning with GCC at -O3 Jeff King

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=aD_3Y0PQtfg8Dd9z@pks.im \
    --to=ps@pks$(echo .)im \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=mh@glandium$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox