public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Thomas Wolff <towo@towo.net>
To: cygwin@cygwin.com
Subject: Re: compiling issue
Date: Sat, 21 Jan 2023 16:35:23 +0100	[thread overview]
Message-ID: <d948893d-fbe0-045f-d2cb-90c74a5429b0@towo.net> (raw)
In-Reply-To: <034c01d92d57$fc35f6e0$f4a1e4a0$@icloud.com>



Am 21.01.2023 um 06:19 schrieb Nathan via Cygwin:
> The file here for a game I wanted to use is
> http://www.ifarchive.org/if-archive/games/source/Adventure2.5.tar.gz and it
> all compiled but one file getting the error is init.c  as follows:
Leaving out result types isn't legal C nowadays.
You could compile with
gcc -std=c90

> gcc -O  -c init.c
>
> init.c:167:1: warning: return type defaults to 'int' [-Wimplicit-int]
>
>    167 | initialise() {
>
>        | ^~~~~~~~~~
>
> init.c: In function 'initialise':
>
> init.c:169:13: warning: implicit declaration of function 'quick_init'
> [-Wimplicit-function-declaration]
>
>    169 |         if(!quick_init()){raw_init(); report(); quick_save();}
>
>        |             ^~~~~~~~~~
>
> init.c:169:27: warning: implicit declaration of function 'raw_init'
> [-Wimplicit-function-declaration]
>
>    169 |         if(!quick_init()){raw_init(); report(); quick_save();}
>
>        |                           ^~~~~~~~
>
> init.c:169:39: warning: implicit declaration of function 'report'
> [-Wimplicit-function-declaration]
>
>    169 |         if(!quick_init()){raw_init(); report(); quick_save();}
>
>        |                                       ^~~~~~
>
> init.c:169:49: warning: implicit declaration of function 'quick_save'
> [-Wimplicit-function-declaration]
>
>    169 |         if(!quick_init()){raw_init(); report(); quick_save();}
>
>        |                                                 ^~~~~~~~~~
>
> init.c:170:9: warning: implicit declaration of function 'finish_init'
> [-Wimplicit-function-declaration]
>
>    170 |         finish_init();
>
>        |         ^~~~~~~~~~~
>
> init.c: At top level:
>
> init.c:173:8: warning: return type defaults to 'int' [-Wimplicit-int]
>
>    173 | static raw_init() {
>
>        |        ^~~~~~~~
>
> init.c:173:8: error: static declaration of 'raw_init' follows non-static
> declaration
>
> init.c:169:27: note: previous implicit declaration of 'raw_init' with type
> 'int()'
>
>    169 |         if(!quick_init()){raw_init(); report(); quick_save();}
>
>        |                           ^~~~~~~~
>
> init.c:369:8: warning: return type defaults to 'int' [-Wimplicit-int]
>
>    369 | static finish_init() {
>
>        |        ^~~~~~~~~~~
>
> init.c:369:8: error: static declaration of 'finish_init' follows non-static
> declaration
>
> init.c:170:9: note: previous implicit declaration of 'finish_init' with type
> 'int()'
>
>    170 |         finish_init();
>
>        |         ^~~~~~~~~~~
>
> init.c:593:8: warning: return type defaults to 'int' [-Wimplicit-int]
>
>    593 | static report() {
>
>        |        ^~~~~~
>
> init.c:593:8: error: static declaration of 'report' follows non-static
> declaration
>
> init.c:169:39: note: previous implicit declaration of 'report' with type
> 'int()'
>
>    169 |         if(!quick_init()){raw_init(); report(); quick_save();}
>
>        |                                       ^~~~~~
>
> init.c:635:8: warning: return type defaults to 'int' [-Wimplicit-int]
>
>    635 | static quick_init() {
>
>        |        ^~~~~~~~~~
>
> init.c:635:8: error: static declaration of 'quick_init' follows non-static
> declaration
>
> init.c:169:13: note: previous implicit declaration of 'quick_init' with type
> 'int()'
>
>    169 |         if(!quick_init()){raw_init(); report(); quick_save();}
>
>        |             ^~~~~~~~~~
>
> init.c: In function 'quick_init':
>
> init.c:648:9: warning: implicit declaration of function 'quick_io'; did you
> mean 'quick_init'? [-Wimplicit-function-declaration]
>
>    648 |         quick_io();
>
>        |         ^~~~~~~~
>
>        |         quick_init
>
> init.c: At top level:
>
> init.c:655:8: warning: return type defaults to 'int' [-Wimplicit-int]
>
>    655 | static quick_save() {
>
>        |        ^~~~~~~~~~
>
> init.c:655:8: error: static declaration of 'quick_save' follows non-static
> declaration
>
> init.c:169:49: note: previous implicit declaration of 'quick_save' with type
> 'int()'
>
>    169 |         if(!quick_init()){raw_init(); report(); quick_save();}
>
>        |                                                 ^~~~~~~~~~
>
> init.c:667:8: warning: return type defaults to 'int' [-Wimplicit-int]
>
>    667 | static quick_io() {
>
>        |        ^~~~~~~~
>
> init.c:667:8: error: static declaration of 'quick_io' follows non-static
> declaration
>
> init.c:648:9: note: previous implicit declaration of 'quick_io' with type
> 'int()'
>
>    648 |         quick_io();
>
>        |         ^~~~~~~~
>
> make: *** [Makefile:8: init.o] Error 1
>
>   
>
>   
>
> so any tips or suggestions to fix this would be appreciated.
>
>   
>
> Thank you.
>
>   
>
>   
>
>   
>
>   
>
>   
>
>


      parent reply	other threads:[~2023-01-21 15:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21  5:19 internetking425
2023-01-21  7:47 ` Arrigo Marchiori
2023-01-21 13:07   ` Jon Turney
2023-01-21 15:35 ` Thomas Wolff [this message]

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=d948893d-fbe0-045f-d2cb-90c74a5429b0@towo.net \
    --to=towo@towo.net \
    --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).