Patch, CMake, fix some warnings in DTL
Kornel Benko
kornel at lyx.org
Mon Sep 7 19:09:26 UTC 2020
Am Mon, 7 Sep 2020 20:51:52 +0200
schrieb Yu Jin <yu_jin at lyx.org>:
> Can I commit the attached patch? It is used here (dtl.h):
>
> #if (defined(__cplusplus) || defined(__STDC__) || defined(c_plusplus))
> #define STDC 1
> #else
> #define STDC 0
> #endif
>
> /* Version (Traditional or ANSI) of C affects prototype and type
> definitions */
> #if STDC
> #define ARGS(parenthesized_list) parenthesized_list
> #else /* NOT STDC */
> #define ARGS(parenthesized_list) ()
> #endif /* NOT STDC */
>
> #if STDC
> #define Void void <-- meant to activate this
> #define VOID void
> #define FILE_BEGIN SEEK_SET
> #else /* NOT STDC */
> #define Void int <-- currently this is used
> #define VOID
> #define FILE_BEGIN 0
> #endif /* NOT STDC */
>
> so the functions which don't return anything actually end up as
> "int fun(...)" not "void fun(...)" and Warnings are produced.
>
> Can also enclose it in a "if (WIN32)" block if not wanted on other
> platforms.
So it is not STDC on Windows?
Then I propose to wrap the changes into "if (WIN32)"
Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200907/5b3a4b7e/attachment.asc>
More information about the lyx-devel
mailing list