bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #58075] compiler warning: add explicit braces to avoid dangling els


From: anonymous
Subject: [bug #58075] compiler warning: add explicit braces to avoid dangling else
Date: Sun, 29 Mar 2020 09:35:19 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15

URL:
  <https://savannah.gnu.org/bugs/?58075>

                 Summary: compiler warning: add explicit braces to avoid
dangling else
                 Project: make
            Submitted by: None
            Submitted on: Sun 29 Mar 2020 01:35:17 PM UTC
                Severity: 3 - Normal
              Item Group: Build/Install
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.3
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Hopefully someone can make this update

diff --git a/src/getopt.c b/src/getopt.c
index 35e71ef..e0647ae 100644
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -677,6 +677,7 @@ _getopt_internal (int argc, char *const *argv, const char
*optstring,
              else
                {
                  if (opterr)
+                  {
                   if (argv[optind - 1][1] == '-')
                    /* --option */
                    fprintf (stderr,
@@ -687,6 +688,7 @@ _getopt_internal (int argc, char *const *argv, const char
*optstring,
                    fprintf (stderr,
                     _("%s: option '%c%s' doesn't allow an argument\n"),
                     argv[0], argv[optind - 1][0], pfound->name);
+                  }
 
                  nextchar += strlen (nextchar);
 





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58075>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]