Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index


On 22/08/18 12:31, scan-admin@coverity.com wrote:
** CID 1438474:  Control flow issues  (DEADCODE)
/include/rtl/stringutils.hxx: 176 in rtl::libreoffice_internal::ConstCharArrayDetector<const char [1], 
void>::isValid(const char (&)[1])()


________________________________________________________________________________________________________
*** CID 1438474:  Control flow issues  (DEADCODE)
/include/rtl/stringutils.hxx: 176 in rtl::libreoffice_internal::ConstCharArrayDetector<const char [1], 
void>::isValid(const char (&)[1])()
170         static const bool ok = true;
171     #if defined LIBO_INTERNAL_ONLY && HAVE_CXX14_CONSTEXPR
172         constexpr
173     #endif
174         static bool isValid(char const (& literal)[N]) {
175             for (std::size_t i = 0; i != N - 1; ++i) {
     CID 1438474:  Control flow issues  (DEADCODE)
     Execution cannot reach this statement: "if ((*literal)[i] == 0) {
  ...".

who's being dumb here, me or Coverity?

176                 if (literal[i] == '\0') {
177                     return false;
178                 }
179             }
180             return literal[N - 1] == '\0';
181         }

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.