Patch, CMake, fix some warnings in DTL
Yu Jin
yu_jin at lyx.org
Mon Sep 7 19:28:57 UTC 2020
Am Mo., 7. Sept. 2020 um 21:09 Uhr schrieb Kornel Benko <kornel at lyx.org>:
> 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)"
>
> Ok done.
--
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200907/bc9aae5b/attachment.html>
More information about the lyx-devel
mailing list