[scribus-dev] [FreeBSD, clang] runscriptdialog.cpp:13:43: error: addition of default argument on redeclaration

Boris Samorodov bsam at passap.ru
Tue Jun 18 21:48:34 UTC 2013


07.05.2013 15:49, Boris Samorodov пишет:
> Hello All,
> 
> I try to build scribus-1.4.2 at FreeBSD-10-amd64 with clang-3.3 (the
> default system compiler):
> -----
> % uname -a
> FreeBSD bsam.int.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #17 r250269:
> Sun May  5 23:07:37 SAMT 2013
> bsam at bsam.int.wart.ru:/usr/obj/usr/src/sys/BB64X  amd64
> 
> % clang --version
> FreeBSD clang version 3.3 (trunk 178860) 20130405
> Target: x86_64-unknown-freebsd10.0
> Thread model: posix
> -----
> 
> ...and get an error:
> -----
> [ 89%] Building CXX object
> scribus/plugins/scriptplugin/CMakeFiles/scriptplugin.dir/runscriptdialog.cpp.o
> /usr/ports/print/scribus/work/scribus-1.4.2/scribus/plugins/scriptplugin/runscriptdialog.cpp:13:43:
> error: addition of default argument on redeclaration makes this
> constructor a default
>       constructor
> RunScriptDialog::RunScriptDialog(QWidget* parent = 0, bool extEnable =
> false) :
>                                           ^        ~
> /usr/ports/print/scribus/work/scribus-1.4.2/scribus/plugins/scriptplugin/runscriptdialog.h:24:3:
> note: previous declaration is here
>                 RunScriptDialog(QWidget* parent, bool extEnable);
>                 ^
> 1 error generated.
> ***
> [scribus/plugins/scriptplugin/CMakeFiles/scriptplugin.dir/runscriptdialog.cpp.o]
> Error code 1
> -----
> 
> The attached patch helps to finish the build. But I'm not sure if
> it DTRT.
> 
> Is it a clang bug? If yes can someone create a tiny testcase which
> I'll submit upstream? Or should scribus use another way to
> initialize the variable "parent"?
> 
> I'm not an expert here so please give me an advice how to proceed.

OK, I reworked a patch a little. It seems to do what was intended.
Please, comment/commit.

Thank you.

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scribus.diff
Type: text/x-diff
Size: 977 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20130619/230ef14d/attachment.bin>


More information about the scribus-dev mailing list