delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/04/05/13:35:34

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 591663858D1E
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=systematicsw.ab.ca
X-Authority-Analysis: v=2.4 cv=XrLphHJ9 c=1 sm=1 tr=0 ts=624c7dd3
a=oHm12aVswOWz6TMtn9zYKg==:117 a=oHm12aVswOWz6TMtn9zYKg==:17
a=IkcTkHD0fZMA:10 a=mDV3o1hIAAAA:8 a=94nOnFI1EgyDtX4ev68A:9 a=QEXdDO2ut3YA:10
a=_FVE-zBwftR9WsbkzFJk:22
Message-ID: <bc41bdfd-ab53-12bb-f45e-4622d0498057@SystematicSw.ab.ca>
Date: Tue, 5 Apr 2022 11:35:15 -0600
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Subject: Re: Compiling gnu diction on Cygwin
To: cygwin AT cygwin DOT com
References: <CAFWoy7ESdsGMzn7cxcnG1TCy1tJq1CQ7v6hfcmt80-1RdkUMLQ AT mail DOT gmail DOT com>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Organization: Systematic Software
In-Reply-To: <CAFWoy7ESdsGMzn7cxcnG1TCy1tJq1CQ7v6hfcmt80-1RdkUMLQ@mail.gmail.com>
X-CMAE-Envelope: MS4xfG6TysD3y/CeW8+P2e9gGYNNDsEGAJbefGJnAFHI+dCYqD9vEnnp7aeHbO1FejZhAKkdCO1h/NBR4H5Go8g9zS3P/8VWJ/TejFIfWe7cNvXqx/y+dtxq
vm+e4cM7HoVNzmV8qfosOja6KbkqzvUqvOWzCSIvxhkLi3S8GEdM9RKOOMwS3ChlpwfY+oNbGjxCj+VpkbIrqvfjFsSVAnyIq8I=
X-Spam-Status: No, score=-1164.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, NICE_REPLY_A, RCVD_IN_MSPIKE_H2,
SPF_HELO_NONE, SPF_NONE, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT 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.]

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019