SVN commit 941567 by dfaure: I disagree with Andreas Pakulat, this compiler warning in code generated by kconfig_compiler is fixable ;-) Proof below. BUG: 187579 M +16 -7 kconfig_compiler.cpp --- trunk/KDE/kdelibs/kdecore/kconfig_compiler/kconfig_compiler.cpp #941566:941567 @@ -781,6 +781,13 @@ return result; } +static bool isUnsigned(const QString& type) +{ + if ( type == "UInt" ) return true; + if ( type == "ULongLong" ) return true; + return false; +} + /** Return parameter declaration for given type. */ @@ -1075,13 +1082,15 @@ if (!e->minValue().isEmpty()) { - out << "if (v < " << e->minValue() << ")" << endl; - out << "{" << endl; - out << " kDebug() << \"" << setFunction(n); - out << ": value \" << v << \" is less than the minimum value of "; - out << e->minValue()<< "\" << endl;" << endl; - out << " v = " << e->minValue() << ";" << endl; - out << "}" << endl; + if (e->minValue() != "0" || !isUnsigned(t)) { // skip writing "if uint<0" (#187579) + out << "if (v < " << e->minValue() << ")" << endl; + out << "{" << endl; + out << " kDebug() << \"" << setFunction(n); + out << ": value \" << v << \" is less than the minimum value of "; + out << e->minValue()<< "\" << endl;" << endl; + out << " v = " << e->minValue() << ";" << endl; + out << "}" << endl; + } } if (!e->maxValue().isEmpty())