Patch, CMake, fix some warnings in DTL
Yu Jin
yu_jin at lyx.org
Mon Sep 7 18:51:52 UTC 2020
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.
--
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200907/5ef46b97/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file.diff
Type: application/octet-stream
Size: 515 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200907/5ef46b97/attachment-0001.obj>
More information about the lyx-devel
mailing list