public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Compiling gnu diction on Cygwin
Date: Tue, 5 Apr 2022 11:35:15 -0600	[thread overview]
Message-ID: <bc41bdfd-ab53-12bb-f45e-4622d0498057@SystematicSw.ab.ca> (raw)
In-Reply-To: <CAFWoy7ESdsGMzn7cxcnG1TCy1tJq1CQ7v6hfcmt80-1RdkUMLQ@mail.gmail.com>

On 2022-04-05 07:27, Keith Christian wrote:
> I successfully compiled diction and style from this tar file, but with errors:
> https://ftp.gnu.org/gnu/diction/diction-1.11.tar.gz
> Diction and style both work, but I am looking for suggestions for how
> to clean up the compile errors in lines 48 - 60 below:
...
>      48  getopt.c:147:1: warning: function declaration isnt a prototype
> [-Wstrict-prototypes]
>      49    147 | extern char *getenv ();
>      50        | ^~~~~~
>      51  getopt.c: In function _getopt_internal_r:
>      52  getopt.c:444:23: warning: cast discards const qualifier from
> pointer target type [-Wcast-qual]
>      53    444 |             exchange ((char **) argv, d);
>      54        |                       ^
>      55  getopt.c:467:23: warning: cast discards const qualifier from
> pointer target type [-Wcast-qual]
>      56    467 |             exchange ((char **) argv, d);
>      57        |                       ^
>      58  getopt.c:774:27: warning: cast discards const qualifier from
> pointer target type [-Wcast-qual]
>      59    774 |           d->__nextchar = (char *) "";
>      60        |                           ^

#include <stdlib.h>
remove casts (should not normally be required or used in C)

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

  reply	other threads:[~2022-04-05 17:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05 13:27 Keith Christian
2022-04-05 17:35 ` Brian Inglis [this message]
2022-04-06 12:04 ` Csaba Raduly
2022-04-06 14:59   ` Keith Christian
2022-04-06 18:31     ` Brian Inglis

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=bc41bdfd-ab53-12bb-f45e-4622d0498057@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).