Fix compile with Clang 10.0.1
Env
System
OpenBSD 6.7-current (GENERIC.MP) #36: Sat Aug 22 11:27:03 MDT 2020
deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17023250432 (16234MB)
avail mem = 16492290048 (15728MB)
Compiler
clang --version
OpenBSD clang version 10.0.1
Target: amd64-unknown-openbsd6.7
Thread model: posix
InstalledDir: /usr/bin
Qt
qmake-qt5 -v
QMake version 3.1
Using Qt version 5.13.2 in /usr/local/lib/qt5
CMake
cmake --version
cmake version 3.17.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
Error / Issue
See compiler error message:
/usr/ports/pobj/dolphin-plugins-kf5-20.08.0/bin/c++ -DKCOREADDONS_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_URL_CAST_FROM_STRING -DQT_WIDGETS_LIB -DQT_XML_LIB -DTRANSLATION_DOMAIN=\"fileviewsvnplugin\" -D_LARGEFILE64_SOURCE -Dfileviewsvnplugin_EXPORTS -Isvn -I/usr/ports/pobj/dolphin-plugins-kf5-20.08.0/dolphin-plugins-20.08.0/svn -Isvn/fileviewsvnplugin_autogen/include -I. -isystem /usr/local/include/X11/qt5 -isystem /usr/local/include/X11/qt5/QtCore -isystem /usr/local/lib/qt5/./mkspecs/openbsd-clang -isystem /usr/local/include/X11/qt5/QtWidgets -isystem /usr/local/include/X11/qt5/QtGui -isystem /usr/X11R6/include -isystem /usr/local/include/KF5/KI18n -isystem /usr/local/include/KF5 -isystem /usr/local/include/KF5/KXmlGui -isystem /usr/local/include/X11/qt5/QtXml -isystem /usr/local/include/KF5/KConfigCore -isystem /usr/local/include/KF5/KConfigWidgets -isystem /usr/local/include/KF5/KCodecs -isystem /usr/local/include/KF5/KWidgetsAddons -isystem /usr/local/include/KF5/KConfigGui -isystem /usr/local/include/KF5/KAuth -isystem /usr/local/include/KF5/KCoreAddons -isystem /usr/local/include/X11/qt5/QtDBus -isystem /usr/local/include/KF5/KIOCore -isystem /usr/local/include/KF5/KService -isystem /usr/local/include/X11/qt5/QtNetwork -isystem /usr/local/include/X11/qt5/QtConcurrent -isystem /usr/local/include/KF5/KIOWidgets -isystem /usr/local/include/KF5/KIOGui -isystem /usr/local/include/KF5/KWindowSystem -isystem /usr/local/include/KF5/KJobWidgets -isystem /usr/local/include/KF5/KCompletion -isystem /usr/local/include -O2 -pipe -fno-operator-names -fno-exceptions -Wno-gnu-zero-variadic-macro-arguments -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -fdiagnostics-color=always -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=gnu++11 -MD -MT svn/CMakeFiles/fileviewsvnplugin.dir/fileviewsvnplugin_autogen/mocs_compilation.cpp.o -MF svn/CMakeFiles/fileviewsvnplugin.dir/fileviewsvnplugin_autogen/mocs_compilation.cpp.o.d -o svn/CMakeFiles/fileviewsvnplugin.dir/fileviewsvnplugin_autogen/mocs_compilation.cpp.o -c svn/fileviewsvnplugin_autogen/mocs_compilation.cpp
In file included from svn/fileviewsvnplugin_autogen/mocs_compilation.cpp:6:
In file included from svn/fileviewsvnplugin_autogen/EWIEGA46WW/moc_svnlogdialog.cpp:10:
In file included from /usr/ports/pobj/dolphin-plugins-kf5-20.08.0/dolphin-plugins-20.08.0/svn/svnlogdialog.h:27:
/usr/ports/pobj/dolphin-plugins-kf5-20.08.0/dolphin-plugins-20.08.0/svn/svncommands.h:38:13: error: '__sF' declared as array of references of type 'QString (&)'
QString stdout; ///< Process stdout.
^
/usr/include/stdio.h:198:22: note: expanded from macro 'stdout'
#define stdout (&__sF[1])
^
In file included from svn/fileviewsvnplugin_autogen/mocs_compilation.cpp:6:
In file included from svn/fileviewsvnplugin_autogen/EWIEGA46WW/moc_svnlogdialog.cpp:10:
In file included from /usr/ports/pobj/dolphin-plugins-kf5-20.08.0/dolphin-plugins-20.08.0/svn/svnlogdialog.h:27:
/usr/ports/pobj/dolphin-plugins-kf5-20.08.0/dolphin-plugins-20.08.0/svn/svncommands.h:39:13: error: '__sF' declared as array of references of type 'QString (&)'
QString stderr; ///< Process stderr.
^
/usr/include/stdio.h:199:22: note: expanded from macro 'stderr'
#define stderr (&__sF[2])
^
In file included from svn/fileviewsvnplugin_autogen/mocs_compilation.cpp:6:
In file included from svn/fileviewsvnplugin_autogen/EWIEGA46WW/moc_svnlogdialog.cpp:10:
In file included from /usr/ports/pobj/dolphin-plugins-kf5-20.08.0/dolphin-plugins-20.08.0/svn/svnlogdialog.h:27:
/usr/ports/pobj/dolphin-plugins-kf5-20.08.0/dolphin-plugins-20.08.0/svn/svncommands.h:39:13: error: duplicate member '__sF'
/usr/include/stdio.h:199:18: note: expanded from macro 'stderr'
#define stderr (&__sF[2])
^
/usr/ports/pobj/dolphin-plugins-kf5-20.08.0/dolphin-plugins-20.08.0/svn/svncommands.h:38:13: note: previous declaration is here
QString stdout; ///< Process stdout.
^
/usr/include/stdio.h:198:18: note: expanded from macro 'stdout'
#define stdout (&__sF[1])
Background Information
I am working on the KDE/Qt packages for OpenBSD. I am an active maintainer of CMake, Qt and KDE Frameworks and KDE Applications on OpenBSD. I want to help with this PR to achieve better support for KDE on OpenBSD.