delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/05/21/08:38:44

From: mh AT mike DOT franken DOT de (Michael Hirmke)
Subject: Re: <time.h> bug???
21 May 1998 08:38:44 -0700 :
Message-ID: <6uH1gHt$pfB.cygnus.gnu-win32@mike.franken.de>
References: <35618130 DOT A2BBBB25 AT cais DOT kaist DOT ac DOT kr>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hi Ho-Jin,

[...]
>wingui.c:67: warning: assignment makes pointer from integer without a
>cast
>wingui.c:69: warning: assignment makes pointer from integer without a
>cast
[...]
>áTotal = strtok(cTime, str);ááááááááá <-- #67 if (char*) is inserted, it
>
[...]
>but i succeed to compile it for a console program with djgpp &
>cygnus-win32... and my friend report me that VC++5.0 handles it
>correctly.
>what makes this difference??? or is it a compiler error?

It is a completely acceptable behaviour !
strtok ist defined as

        char *strtok(char *s, const char *delim);
                     ^^^^^^^
[...]

while you defined "s" as

        static char cTime[50];

which isn't the same !


Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh AT mike DOT franken DOT de
                         | WWW     http://minimike.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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