[opensuse-packaging] rpmlint: Program causes undefined operation

Hello list, rpmlint complains about the following error: I: Program causes undefined operation (likely same variable used twiceand post/pre incremented in the same expression). e.g. x = x++; Split it in two operations. E: pdfedit sequence-point ../engine/qsnumber_object.cpp:85 Log: http://tinyurl.com/pdfeditlog Package: https://build.opensuse.org/package/show?package=pdfedit&project=KDE:Communit... The complained code line: double n = args.isEmpty() ? n = 0.0 : args[0].toNumber(); Full code block: QSObject QSNumberClass::construct( const QSList &args ) const { double n = args.isEmpty() ? n = 0.0 : args[0].toNumber(); return createNumber( n ); } The file qsnumber_object.cpp is part of the Qt Script for Applications framework (QSA) version 1.1. I have looked in newer versions of the QSA source code, but this code line is not changed. I have searched the internet for that and after that, this code line seems to be correct for me, but I am not a programmer... ;-) So, how can I fix this rpmlint error? Best greetings Buschmann ---------------------------------------------------------------------------------- openSUSE Member - de.opensuse.org Sys-Op http://en.opensuse.org/User:Buschmann23

On 3/11/2009 at 2:11, Matthias Fehring <buschmann@huessenbergnetz.de> wrote: double n = args.isEmpty() ? n = 0.0 : args[0].toNumber();
Well, that for sure does not look correct. I'd suggest to change it to double n = args.isEmpty() ? 0.0 : args[0].toNumber(); And don't forget to report this upstream together with the patch ;) Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

Am Mittwoch 11 März 2009 schrieb Dominique Leuenberger:
On 3/11/2009 at 2:11, Matthias Fehring <buschmann@huessenbergnetz.de> wrote:
double n = args.isEmpty() ? n = 0.0 : args[0].toNumber();
Well, that for sure does not look correct.
I'd suggest to change it to double n = args.isEmpty() ? 0.0 : args[0].toNumber();
And don't forget to report this upstream together with the patch ;)
And btw: it's not rpmlint, but post-build-checks. rpmlint only checks the resulting rpms, post-build-checks also checks the build log file Greetings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org

On Wednesday 11 March 2009 10:04:35 Stephan Kulow wrote:
Am Mittwoch 11 März 2009 schrieb Dominique Leuenberger:
On 3/11/2009 at 2:11, Matthias Fehring <buschmann@huessenbergnetz.de> wrote:
double n = args.isEmpty() ? n = 0.0 : args[0].toNumber();
Well, that for sure does not look correct.
I'd suggest to change it to double n = args.isEmpty() ? 0.0 : args[0].toNumber();
And don't forget to report this upstream together with the patch ;)
And btw: it's not rpmlint, but post-build-checks. rpmlint only checks the resulting rpms, post-build-checks also checks the build log file
Greetings, Stephan
Thank you both for your help and information. :) Bug is reported upstream. Best greetings Buschmann ---------------------------------------------------------------------------------- openSUSE Member - de.opensuse.org Sys-Op http://en.opensuse.org/User:Buschmann23
participants (3)
-
Dominique Leuenberger
-
Matthias Fehring
-
Stephan Kulow