bugmake - Bugs: bug #58075, getopt.c: compiler warning: add...

 
 

bug #58075: getopt.c: compiler warning: add explicit braces to avoid dangling else

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
Component Version:  4.3 Operating System:  POSIX-Based
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Sun 29 Mar 2020 01:35:17 PM UTC, original submission:  

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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-12-24 psmith Summarycompiler warning: add explicit braces to avoid dangling else => getopt.c: compiler warning: add explicit braces to avoid dangling else

    Back to the top


    Powered by Savane 3.9