highlight-3.42
List of Defects
Error: UNINIT_CTOR (CWE-456): [#def1]
highlight-3.42/src/cli/cmdlineoptions.h:427: member_decl: Class member declaration for "opt_asformat_output".
highlight-3.42/src/cli/cmdlineoptions.cpp:233: uninit_member: Non-static class member "opt_asformat_output" is not initialized in this constructor nor in any functions that it calls.
# 231| }
# 232| }
# 233|-> }
# 234|
# 235| CmdLineOptions::~CmdLineOptions() {}
Error: MISSING_BREAK (CWE-484): [#def2]
highlight-3.42/src/cli/cmdlineoptions.cpp:339: unterminated_case: The case for value "S_OPT_COMPAT_LINENUM" is not terminated by a 'break' statement.
highlight-3.42/src/cli/cmdlineoptions.cpp:341: fallthrough: The above case falls through to this one.
# 339| case S_OPT_COMPAT_LINENUM:
# 340| if ( arg=="0" ) opt_fill_zeroes=true;
# 341|-> case 'l':
# 342| opt_linenumbers = true;
# 343| break;
Error: COMPILER_WARNING: [#def3]
highlight-3.42/src/cli/main.cpp: scope_hint: In member function 'bool HLCmdLineApp::loadFileTypeConfig(const string&)'
highlight-3.42/src/cli/main.cpp:261:34: warning: catching polymorphic type 'class Diluculum::LuaError' by value [-Wcatch-value=]
# } catch (Diluculum::LuaError err) {
# ^~~
# 259| }
# 260|
# 261|-> } catch (Diluculum::LuaError err) {
# 262| cerr <<err.what()<<"\n";
# 263| return false;
Error: UNINIT_CTOR (CWE-456): [#def4]
highlight-3.42/src/include/Diluculum/LuaFunction.hpp:210: member_decl: Class member declaration for "readerFlag_".
highlight-3.42/src/core/Diluculum/LuaFunction.cpp:39: uninit_member: Non-static class member "readerFlag_" is not initialized in this constructor nor in any functions that it calls.
# 37| data_.typeLuaFunction = new char[size_];
# 38| memcpy(data_.typeLuaFunction, luaChunk.c_str(), size_);
# 39|-> }
# 40|
# 41| LuaFunction::LuaFunction (const void* data, size_t size)
Error: UNINIT_CTOR (CWE-456): [#def5]
highlight-3.42/src/include/Diluculum/LuaFunction.hpp:210: member_decl: Class member declaration for "readerFlag_".
highlight-3.42/src/core/Diluculum/LuaFunction.cpp:46: uninit_member: Non-static class member "readerFlag_" is not initialized in this constructor nor in any functions that it calls.
# 44| data_.typeLuaFunction = new char[size_];
# 45| memcpy(data_.typeLuaFunction, data, size);
# 46|-> }
# 47|
# 48| LuaFunction::LuaFunction (lua_CFunction func)
Error: UNINIT_CTOR (CWE-456): [#def6]
highlight-3.42/src/include/Diluculum/LuaFunction.hpp:210: member_decl: Class member declaration for "readerFlag_".
highlight-3.42/src/core/Diluculum/LuaFunction.cpp:52: uninit_member: Non-static class member "readerFlag_" is not initialized in this constructor nor in any functions that it calls.
# 50| {
# 51| data_.typeCFunction = func;
# 52|-> }
# 53|
# 54| LuaFunction::LuaFunction (const LuaFunction& other)
Error: UNINIT_CTOR (CWE-456): [#def7]
highlight-3.42/src/include/Diluculum/LuaFunction.hpp:210: member_decl: Class member declaration for "readerFlag_".
highlight-3.42/src/core/Diluculum/LuaFunction.cpp:70: uninit_member: Non-static class member "readerFlag_" is not initialized in this constructor nor in any functions that it calls.
# 68| break;
# 69| }
# 70|-> }
# 71|
# 72|
Error: UNCAUGHT_EXCEPT (CWE-248): [#def8]
highlight-3.42/src/cli/main.cpp:696: root_function: In function "main(int, char const **)" an exception of type "Diluculum::LuaTypeError" is thrown and never caught.
highlight-3.42/src/cli/main.cpp:699: fun_call_w_exception: Called function throws an exception of type "Diluculum::LuaTypeError".
highlight-3.42/src/cli/main.cpp:415:9: fun_call_w_exception: Called function throws an exception of type "Diluculum::LuaTypeError".
highlight-3.42/src/cli/main.cpp:129:9: fun_call_w_exception: Called function throws an exception of type "Diluculum::LuaTypeError".
highlight-3.42/src/core/Diluculum/LuaVariable.cpp:66:20: fun_call_w_exception: Called function throws an exception of type "Diluculum::LuaTypeError".
highlight-3.42/src/core/Diluculum/LuaUtils.cpp:116:13: exception_thrown: An exception of type "Diluculum::LuaTypeError" is thrown.
# 114| default:
# 115| {
# 116|-> throw LuaTypeError(
# 117| ("Unsupported type found in call to 'ToLuaValue()': "
# 118| + boost::lexical_cast<std::string>(lua_type (state, index))
Error: CPPCHECK_WARNING (CWE-686): [#def9]
highlight-3.42/src/core/Diluculum/LuaValue.cpp:195: error[memsetClass]: Using 'memcpy' on union that contains a 'std::string'.
# 193| default:
# 194| // no constructor needed.
# 195|-> memcpy (&data_, &other.data_, sizeof(PossibleTypes));
# 196| break;
# 197| }
Error: COMPILER_WARNING: [#def10]
highlight-3.42/src/core/Diluculum/LuaValue.cpp: scope_hint: In copy constructor 'Diluculum::LuaValue::LuaValue(const Diluculum::LuaValue&)'
highlight-3.42/src/core/Diluculum/LuaValue.cpp:195:64: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'union Diluculum::LuaValue::PossibleTypes' with no trivial copy-assignment [-Wclass-memaccess]
# memcpy (&data_, &other.data_, sizeof(PossibleTypes));
# ^
highlight-3.42/src/core/Diluculum/LuaValue.cpp:28: included_from: Included from here.
highlight-3.42/src/include/Diluculum/LuaValue.hpp:287:16: note: 'union Diluculum::LuaValue::PossibleTypes' declared here
# union PossibleTypes
# ^~~~~~~~~~~~~
# 193| default:
# 194| // no constructor needed.
# 195|-> memcpy (&data_, &other.data_, sizeof(PossibleTypes));
# 196| break;
# 197| }
Error: CPPCHECK_WARNING (CWE-686): [#def11]
highlight-3.42/src/core/Diluculum/LuaValue.cpp:229: error[memsetClass]: Using 'memcpy' on union that contains a 'std::string'.
# 227| default:
# 228| // no constructor needed.
# 229|-> memcpy (&data_, &rhs.data_, sizeof(PossibleTypes));
# 230| break;
# 231| }
Error: COMPILER_WARNING: [#def12]
highlight-3.42/src/core/Diluculum/LuaValue.cpp: scope_hint: In member function 'Diluculum::LuaValue& Diluculum::LuaValue::operator=(const Diluculum::LuaValue&)'
highlight-3.42/src/core/Diluculum/LuaValue.cpp:229:62: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'union Diluculum::LuaValue::PossibleTypes' with no trivial copy-assignment [-Wclass-memaccess]
# memcpy (&data_, &rhs.data_, sizeof(PossibleTypes));
# ^
highlight-3.42/src/core/Diluculum/LuaValue.cpp:28: included_from: Included from here.
highlight-3.42/src/include/Diluculum/LuaValue.hpp:287:16: note: 'union Diluculum::LuaValue::PossibleTypes' declared here
# union PossibleTypes
# ^~~~~~~~~~~~~
# 227| default:
# 228| // no constructor needed.
# 229|-> memcpy (&data_, &rhs.data_, sizeof(PossibleTypes));
# 230| break;
# 231| }
Error: UNCAUGHT_EXCEPT (CWE-248): [#def13]
/usr/include/c++/8/bits/move.h:47: exn_spec_violation: An exception of type "Diluculum::TypeMismatchError" is thrown but the throw list "throw()" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
/usr/include/c++/8/bits/move.h:48: fun_call_w_exception: Called function throws an exception of type "Diluculum::TypeMismatchError".
highlight-3.42/src/core/Diluculum/LuaValue.cpp:178:13: fun_call_w_exception: Called function throws an exception of type "Diluculum::TypeMismatchError".
highlight-3.42/src/core/Diluculum/LuaValue.cpp:323:10: exception_thrown: An exception of type "Diluculum::TypeMismatchError" is thrown.
# 321| else
# 322| {
# 323|-> throw TypeMismatchError ("string", typeName());
# 324| }
# 325| }
Error: CTOR_DTOR_LEAK (CWE-772): [#def14]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:76: alloc_new: Allocating memory by calling "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:76: var_assign: Assigning: "this->headers" = "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:76: ctor_dtor_leak: The constructor allocates field "headers" of "astyle::ASBeautifier" but the destructor and whatever functions it calls do not free it.
# 74| // initialize ASBeautifier member vectors
# 75| beautifierFileType = 9; // reset to an invalid type
# 76|-> headers = new vector<const string*>;
# 77| nonParenHeaders = new vector<const string*>;
# 78| assignmentOperators = new vector<const string*>;
Error: CTOR_DTOR_LEAK (CWE-772): [#def15]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:77: alloc_new: Allocating memory by calling "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:77: var_assign: Assigning: "this->nonParenHeaders" = "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:77: ctor_dtor_leak: The constructor allocates field "nonParenHeaders" of "astyle::ASBeautifier" but the destructor and whatever functions it calls do not free it.
# 75| beautifierFileType = 9; // reset to an invalid type
# 76| headers = new vector<const string*>;
# 77|-> nonParenHeaders = new vector<const string*>;
# 78| assignmentOperators = new vector<const string*>;
# 79| nonAssignmentOperators = new vector<const string*>;
Error: CTOR_DTOR_LEAK (CWE-772): [#def16]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:78: alloc_new: Allocating memory by calling "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:78: var_assign: Assigning: "this->assignmentOperators" = "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:78: ctor_dtor_leak: The constructor allocates field "assignmentOperators" of "astyle::ASBeautifier" but the destructor and whatever functions it calls do not free it.
# 76| headers = new vector<const string*>;
# 77| nonParenHeaders = new vector<const string*>;
# 78|-> assignmentOperators = new vector<const string*>;
# 79| nonAssignmentOperators = new vector<const string*>;
# 80| preBlockStatements = new vector<const string*>;
Error: CTOR_DTOR_LEAK (CWE-772): [#def17]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:79: alloc_new: Allocating memory by calling "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:79: var_assign: Assigning: "this->nonAssignmentOperators" = "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:79: ctor_dtor_leak: The constructor allocates field "nonAssignmentOperators" of "astyle::ASBeautifier" but the destructor and whatever functions it calls do not free it.
# 77| nonParenHeaders = new vector<const string*>;
# 78| assignmentOperators = new vector<const string*>;
# 79|-> nonAssignmentOperators = new vector<const string*>;
# 80| preBlockStatements = new vector<const string*>;
# 81| preCommandHeaders = new vector<const string*>;
Error: CTOR_DTOR_LEAK (CWE-772): [#def18]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:80: alloc_new: Allocating memory by calling "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:80: var_assign: Assigning: "this->preBlockStatements" = "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:80: ctor_dtor_leak: The constructor allocates field "preBlockStatements" of "astyle::ASBeautifier" but the destructor and whatever functions it calls do not free it.
# 78| assignmentOperators = new vector<const string*>;
# 79| nonAssignmentOperators = new vector<const string*>;
# 80|-> preBlockStatements = new vector<const string*>;
# 81| preCommandHeaders = new vector<const string*>;
# 82| indentableHeaders = new vector<const string*>;
Error: CTOR_DTOR_LEAK (CWE-772): [#def19]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:81: alloc_new: Allocating memory by calling "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:81: var_assign: Assigning: "this->preCommandHeaders" = "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:81: ctor_dtor_leak: The constructor allocates field "preCommandHeaders" of "astyle::ASBeautifier" but the destructor and whatever functions it calls do not free it.
# 79| nonAssignmentOperators = new vector<const string*>;
# 80| preBlockStatements = new vector<const string*>;
# 81|-> preCommandHeaders = new vector<const string*>;
# 82| indentableHeaders = new vector<const string*>;
# 83| }
Error: CTOR_DTOR_LEAK (CWE-772): [#def20]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:82: alloc_new: Allocating memory by calling "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:82: var_assign: Assigning: "this->indentableHeaders" = "new std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const *> >".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:82: ctor_dtor_leak: The constructor allocates field "indentableHeaders" of "astyle::ASBeautifier" but the destructor and whatever functions it calls do not free it.
# 80| preBlockStatements = new vector<const string*>;
# 81| preCommandHeaders = new vector<const string*>;
# 82|-> indentableHeaders = new vector<const string*>;
# 83| }
# 84|
Error: UNINIT_CTOR (CWE-456): [#def21]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "lineIsLineCommentOnly" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:540: member_decl: Class member declaration for "shouldIndentBracedLine".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "shouldIndentBracedLine" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:541: member_decl: Class member declaration for "isInSwitch".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "isInSwitch" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:542: member_decl: Class member declaration for "foundPreCommandHeader".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "foundPreCommandHeader" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:543: member_decl: Class member declaration for "foundPreCommandMacro".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "foundPreCommandMacro" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:546: member_decl: Class member declaration for "indentCount".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "indentCount" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:547: member_decl: Class member declaration for "spaceIndentCount".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "spaceIndentCount" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:548: member_decl: Class member declaration for "spaceIndentObjCMethodAlignment".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "spaceIndentObjCMethodAlignment" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:549: member_decl: Class member declaration for "bracePosObjCMethodAlignment".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "bracePosObjCMethodAlignment" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:550: member_decl: Class member declaration for "colonIndentObjCMethodAlignment".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "colonIndentObjCMethodAlignment" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:551: member_decl: Class member declaration for "lineOpeningBlocksNum".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "lineOpeningBlocksNum" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:552: member_decl: Class member declaration for "lineClosingBlocksNum".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "lineClosingBlocksNum" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:555: member_decl: Class member declaration for "minConditionalIndent".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "minConditionalIndent" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:556: member_decl: Class member declaration for "parenDepth".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "parenDepth" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:560: member_decl: Class member declaration for "blockTabCount".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "blockTabCount" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:563: member_decl: Class member declaration for "templateDepth".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "templateDepth" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:564: member_decl: Class member declaration for "squareBracketCount".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "squareBracketCount" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:565: member_decl: Class member declaration for "prevFinalLineSpaceIndentCount".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "prevFinalLineSpaceIndentCount" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:566: member_decl: Class member declaration for "prevFinalLineIndentCount".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "prevFinalLineIndentCount" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:567: member_decl: Class member declaration for "defineIndentCount".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "defineIndentCount" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:568: member_decl: Class member declaration for "preprocBlockIndent".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "preprocBlockIndent" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:569: member_decl: Class member declaration for "quoteChar".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "quoteChar" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:570: member_decl: Class member declaration for "prevNonSpaceCh".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "prevNonSpaceCh" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:571: member_decl: Class member declaration for "currentNonSpaceCh".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "currentNonSpaceCh" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:572: member_decl: Class member declaration for "currentNonLegalCh".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "currentNonLegalCh" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:573: member_decl: Class member declaration for "prevNonLegalCh".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:83: uninit_member: Non-static class member "prevNonLegalCh" is not initialized in this constructor nor in any functions that it calls.
# 81| preCommandHeaders = new vector<const string*>;
# 82| indentableHeaders = new vector<const string*>;
# 83|-> }
# 84|
# 85| /**
Error: REVERSE_NEGATIVE (CWE-191): [#def22]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:1477: negative_sink_in_call: Passing "end" to a parameter that cannot be negative. [Note: The source code implementation of the function has been overridden by a builtin model.]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:1481: check_after_sink: You might be using variable "end" before verifying that it is >= 0.
# 1479|
# 1480| // don't trim if it ends in a continuation
# 1481|-> if (end > -1 && str[end] == '\\')
# 1482| end = str.length() - 1;
# 1483|
Error: NEGATIVE_RETURNS (CWE-394): [#def23]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2323: negative_return_fn: Function "convertedLine.find('[', 0UL)" returns a negative number. [Note: The source code implementation of the function has been overridden by a builtin model.]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2323: var_assign: Assigning: signed variable "this->bracePosObjCMethodAlignment" = "find".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2324: negative_returns: "this->bracePosObjCMethodAlignment" is passed to a parameter that cannot be negative.
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2437:2: neg_sink_parm_call: Passing "bracePos" to "operator []", which cannot accept a negative number. [Note: The source code implementation of the function has been overridden by a builtin model.]
# 2322| string convertedLine = getIndentedSpaceEquivalent(line_);
# 2323| bracePosObjCMethodAlignment = convertedLine.find('[');
# 2324|-> keywordIndentObjCMethodAlignment =
# 2325| getObjCFollowingKeyword(convertedLine, bracePosObjCMethodAlignment);
# 2326| colonIndentObjCMethodAlignment = findObjCColonAlignment(convertedLine);
Error: NEGATIVE_RETURNS (CWE-394): [#def24]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2360: negative_return_fn: Function "convertedLine.find('[', 0UL)" returns a negative number. [Note: The source code implementation of the function has been overridden by a builtin model.]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2360: var_assign: Assigning: signed variable "this->bracePosObjCMethodAlignment" = "find".
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2361: negative_returns: "this->bracePosObjCMethodAlignment" is passed to a parameter that cannot be negative.
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2437:2: neg_sink_parm_call: Passing "bracePos" to "operator []", which cannot accept a negative number. [Note: The source code implementation of the function has been overridden by a builtin model.]
# 2359| string convertedLine = getIndentedSpaceEquivalent(line_);
# 2360| bracePosObjCMethodAlignment = convertedLine.find('[');
# 2361|-> keywordIndentObjCMethodAlignment =
# 2362| getObjCFollowingKeyword(convertedLine, bracePosObjCMethodAlignment);
# 2363| }
Error: COPY_PASTE_ERROR (CWE-398): [#def25]
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2453: original: "searchBeg + 1UL" looks like the original copy.
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2445: copy_paste_error: "searchBeg" in "searchBeg + 1UL" looks like a copy-paste error.
highlight-3.42/src/core/astyle/ASBeautifier.cpp:2445: remediation: Should it say "objectEnd" instead?
# 2443| if (line[searchBeg] == '[')
# 2444| {
# 2445|-> objectEnd = line.find(']', searchBeg + 1);
# 2446| if (objectEnd == string::npos)
# 2447| return 0;
Error: UNINIT_CTOR (CWE-456): [#def26]
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "useTabs" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:606: member_decl: Class member declaration for "forceTab".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "forceTab" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:607: member_decl: Class member declaration for "namespaceIndent".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "namespaceIndent" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:608: member_decl: Class member declaration for "caseIndent".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "caseIndent" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:609: member_decl: Class member declaration for "preprocBlockIndent".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "preprocBlockIndent" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:610: member_decl: Class member declaration for "preprocDefineIndent".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "preprocDefineIndent" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:611: member_decl: Class member declaration for "emptyLineFill".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "emptyLineFill" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:614: member_decl: Class member declaration for "lineNumber".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "lineNumber" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:615: member_decl: Class member declaration for "isInQuote".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "isInQuote" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:616: member_decl: Class member declaration for "isInComment".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "isInComment" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:617: member_decl: Class member declaration for "quoteChar".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "quoteChar" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:620: member_decl: Class member declaration for "braceCount".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "braceCount" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:621: member_decl: Class member declaration for "switchDepth".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "switchDepth" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:622: member_decl: Class member declaration for "eventPreprocDepth".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "eventPreprocDepth" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:623: member_decl: Class member declaration for "lookingForCaseBrace".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "lookingForCaseBrace" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:624: member_decl: Class member declaration for "unindentNextLine".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "unindentNextLine" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:625: member_decl: Class member declaration for "shouldUnindentLine".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "shouldUnindentLine" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:626: member_decl: Class member declaration for "shouldUnindentComment".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "shouldUnindentComment" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:632: member_decl: Class member declaration for "switchBraceCount".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member field "sw.switchBraceCount" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:633: member_decl: Class member declaration for "unindentDepth".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member field "sw.unindentDepth" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:634: member_decl: Class member declaration for "unindentCase".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member field "sw.unindentCase" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:641: member_decl: Class member declaration for "nextLineIsEventIndent".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "nextLineIsEventIndent" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:642: member_decl: Class member declaration for "isInEventTable".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "isInEventTable" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:643: member_decl: Class member declaration for "indentableMacros".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "indentableMacros" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:646: member_decl: Class member declaration for "nextLineIsDeclareIndent".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "nextLineIsDeclareIndent" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:647: member_decl: Class member declaration for "isInDeclareSection".
highlight-3.42/src/core/astyle/ASEnhancer.cpp:27: uninit_member: Non-static class member "isInDeclareSection" is not initialized in this constructor nor in any functions that it calls.
# 25| ASEnhancer::ASEnhancer()
# 26| {
# 27|-> }
# 28|
# 29| /**
Error: UNINIT_CTOR (CWE-456): [#def27]
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostNonInStmt" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1026: member_decl: Class member declaration for "isCharImmediatelyPostNonInStmt".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isCharImmediatelyPostNonInStmt" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1027: member_decl: Class member declaration for "isImmediatelyPostComment".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostComment" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1028: member_decl: Class member declaration for "isImmediatelyPostLineComment".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostLineComment" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1029: member_decl: Class member declaration for "isImmediatelyPostEmptyBlock".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostEmptyBlock" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1030: member_decl: Class member declaration for "isImmediatelyPostObjCMethodPrefix".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostObjCMethodPrefix" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1031: member_decl: Class member declaration for "isImmediatelyPostPreprocessor".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostPreprocessor" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1032: member_decl: Class member declaration for "isImmediatelyPostReturn".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostReturn" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1033: member_decl: Class member declaration for "isImmediatelyPostThrow".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostThrow" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1034: member_decl: Class member declaration for "isImmediatelyPostNewDelete".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostNewDelete" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1035: member_decl: Class member declaration for "isImmediatelyPostOperator".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostOperator" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1036: member_decl: Class member declaration for "isImmediatelyPostTemplate".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostTemplate" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1037: member_decl: Class member declaration for "isImmediatelyPostPointerOrReference".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostPointerOrReference" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1040: member_decl: Class member declaration for "isPrependPostBlockEmptyLineRequested".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isPrependPostBlockEmptyLineRequested" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1041: member_decl: Class member declaration for "isAppendPostBlockEmptyLineRequested".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isAppendPostBlockEmptyLineRequested" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1042: member_decl: Class member declaration for "isIndentableProprocessor".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isIndentableProprocessor" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1043: member_decl: Class member declaration for "isIndentableProprocessorBlock".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isIndentableProprocessorBlock" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1044: member_decl: Class member declaration for "prependEmptyLine".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "prependEmptyLine" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1045: member_decl: Class member declaration for "appendOpeningBrace".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "appendOpeningBrace" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1046: member_decl: Class member declaration for "foundClosingHeader".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "foundClosingHeader" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1047: member_decl: Class member declaration for "isInHeader".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isInHeader" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1048: member_decl: Class member declaration for "isImmediatelyPostHeader".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isImmediatelyPostHeader" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1049: member_decl: Class member declaration for "isInCase".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isInCase" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1050: member_decl: Class member declaration for "isFirstPreprocConditional".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isFirstPreprocConditional" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1051: member_decl: Class member declaration for "processedFirstConditional".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "processedFirstConditional" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/astyle/astyle.h:1052: member_decl: Class member declaration for "isJavaStaticConstructor".
highlight-3.42/src/core/astyle/ASFormatter.cpp:99: uninit_member: Non-static class member "isJavaStaticConstructor" is not initialized in this constructor nor in any functions that it calls.
# 97| // initialize ASEnhancer member vectors
# 98| indentableMacros = new vector<const pair<const string, const string>* >;
# 99|-> }
# 100|
# 101| /**
Error: DEADCODE (CWE-561): [#def28]
highlight-3.42/src/core/astyle/ASFormatter.cpp:3456: cond_cannot_single: Condition "nextText == 18446744073709551615UL", taking false branch. Now the value of "nextText" cannot be equal to -1.
highlight-3.42/src/core/astyle/ASFormatter.cpp:3459: cannot_single: At condition "nextText == 18446744073709551615UL", the value of "nextText" cannot be equal to -1.
highlight-3.42/src/core/astyle/ASFormatter.cpp:3459: dead_error_condition: The condition "nextText == 18446744073709551615UL" cannot be true.
highlight-3.42/src/core/astyle/ASFormatter.cpp:3460: dead_error_line: Execution cannot reach this statement: "return false;".
# 3458| size_t nextText2 = line.find_first_not_of(" \t", nextText + 1);
# 3459| if (nextText == string::npos)
# 3460|-> return false;
# 3461| if (line[nextText2] == ')' || line[nextText2] == '*')
# 3462| return true;
Error: NEGATIVE_RETURNS (CWE-394): [#def29]
highlight-3.42/src/core/astyle/ASFormatter.cpp:3458: negative_return_fn: Function "line->find_first_not_of(" \t", nextText + 1UL)" returns a negative number. [Note: The source code implementation of the function has been overridden by a builtin model.]
highlight-3.42/src/core/astyle/ASFormatter.cpp:3458: var_assign: Assigning: unsigned variable "nextText2" = "find_first_not_of".
highlight-3.42/src/core/astyle/ASFormatter.cpp:3461: negative_returns: "nextText2" is passed to a parameter that cannot be negative. [Note: The source code implementation of the function has been overridden by a builtin model.]
# 3459| if (nextText == string::npos)
# 3460| return false;
# 3461|-> if (line[nextText2] == ')' || line[nextText2] == '*')
# 3462| return true;
# 3463| return false;
Error: UNINIT_CTOR (CWE-456): [#def30]
highlight-3.42/src/include/codegenerator.h:584: member_decl: Class member declaration for "currentState".
highlight-3.42/src/core/codegenerator.cpp:151: uninit_member: Non-static class member "currentState" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/codegenerator.h:590: member_decl: Class member declaration for "currentKeywordClass".
highlight-3.42/src/core/codegenerator.cpp:151: uninit_member: Non-static class member "currentKeywordClass" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/codegenerator.h:649: member_decl: Class member declaration for "numberCurrentLine".
highlight-3.42/src/core/codegenerator.cpp:151: uninit_member: Non-static class member "numberCurrentLine" is not initialized in this constructor nor in any functions that it calls.
# 149| outputType ( type )
# 150| {
# 151|-> }
# 152|
# 153|
Error: COMPILER_WARNING: [#def31]
highlight-3.42/src/core/codegenerator.cpp: scope_hint: In member function 'bool highlight::CodeGenerator::initPluginScript(const string&)'
highlight-3.42/src/core/codegenerator.cpp:1778:35: warning: catching polymorphic type 'class Diluculum::LuaError' by value [-Wcatch-value=]
# } catch (Diluculum::LuaError err) {
# ^~~
# 1776| listIdx++;
# 1777| }
# 1778|-> } catch (Diluculum::LuaError err) {
# 1779| userScriptError=err.what();
# 1780| return false;
Error: CHECKED_RETURN (CWE-252): [#def32]
highlight-3.42/src/core/platform_fs.cpp:199: check_return: Calling "stat(entryFilepath.c_str(), &statbuf)" without checking return value. This library function may fail and return an error code. [Note: The source code implementation of the function has been overridden by a builtin model.]
# 197| // get file status
# 198| string entryFilepath = directory + pathSeparator + entry->d_name;
# 199|-> stat ( entryFilepath.c_str(), &statbuf );
# 200| if ( errno ) return;
# 201|
Error: UNINIT_CTOR (CWE-456): [#def33]
highlight-3.42/src/include/stylecolour.h:46: member_decl: Class member declaration for "iRed".
highlight-3.42/src/core/stylecolour.cpp:46: uninit_member: Non-static class member field "rgb.iRed" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/stylecolour.h:47: member_decl: Class member declaration for "iGreen".
highlight-3.42/src/core/stylecolour.cpp:46: uninit_member: Non-static class member field "rgb.iGreen" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/stylecolour.h:48: member_decl: Class member declaration for "iBlue".
highlight-3.42/src/core/stylecolour.cpp:46: uninit_member: Non-static class member field "rgb.iBlue" is not initialized in this constructor nor in any functions that it calls.
# 44| rgbStream << red << " " << green << " " << blue;
# 45| setRGB ( rgbStream.str() );
# 46|-> }
# 47|
# 48| Colour::Colour()
Error: UNINIT_CTOR (CWE-456): [#def34]
highlight-3.42/src/include/stylecolour.h:46: member_decl: Class member declaration for "iRed".
highlight-3.42/src/core/stylecolour.cpp:56: uninit_member: Non-static class member field "rgb.iRed" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/stylecolour.h:47: member_decl: Class member declaration for "iGreen".
highlight-3.42/src/core/stylecolour.cpp:56: uninit_member: Non-static class member field "rgb.iGreen" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/stylecolour.h:48: member_decl: Class member declaration for "iBlue".
highlight-3.42/src/core/stylecolour.cpp:56: uninit_member: Non-static class member field "rgb.iBlue" is not initialized in this constructor nor in any functions that it calls.
# 54| {
# 55| setRGB ( colourString );
# 56|-> }
# 57|
# 58| void Colour::setRGB ( const string & colourString )
Error: COMPILER_WARNING: [#def35]
highlight-3.42/src/core/syntaxreader.cpp: scope_hint: In member function 'highlight::LoadResult highlight::SyntaxReader::load(const string&, const string&, highlight::OutputType)'
highlight-3.42/src/core/syntaxreader.cpp:380:34: warning: catching polymorphic type 'class Diluculum::LuaError' by value [-Wcatch-value=]
# } catch (Diluculum::LuaError err) {
# ^~~
# 378| }
# 379|
# 380|-> } catch (Diluculum::LuaError err) {
# 381| luaErrorMsg = string(err.what());
# 382| return LOAD_FAILED_LUA;
Error: COMPILER_WARNING: [#def36]
highlight-3.42/src/core/themereader.cpp: scope_hint: In member function 'bool highlight::ThemeReader::load(const string&, highlight::OutputType)'
highlight-3.42/src/core/themereader.cpp:128:38: warning: catching polymorphic type 'class Diluculum::LuaFileError' by value [-Wcatch-value=]
# } catch (Diluculum::LuaFileError err) {
# ^~~
# 126| }
# 127|
# 128|-> } catch (Diluculum::LuaFileError err) {
# 129| errorMsg = string(err.what());
# 130| return fileOK=false;
Error: PASS_BY_VALUE (CWE-628): [#def37]
highlight-3.42/src/core/themereader.cpp:131: pass_by_value: Catching an exception object of size 80 bytes by value.
# 129| errorMsg = string(err.what());
# 130| return fileOK=false;
# 131|-> } catch (Diluculum::TypeMismatchError err) {
# 132| errorMsg = string(err.what());
# 133| return fileOK=false;
Error: COMPILER_WARNING: [#def38]
highlight-3.42/src/core/themereader.cpp:131:43: warning: catching polymorphic type 'class Diluculum::TypeMismatchError' by value [-Wcatch-value=]
# } catch (Diluculum::TypeMismatchError err) {
# ^~~
# 129| errorMsg = string(err.what());
# 130| return fileOK=false;
# 131|-> } catch (Diluculum::TypeMismatchError err) {
# 132| errorMsg = string(err.what());
# 133| return fileOK=false;
Error: COMPILER_WARNING: [#def39]
highlight-3.42/src/core/themereader.cpp:134:40: warning: catching polymorphic type 'class Diluculum::LuaSyntaxError' by value [-Wcatch-value=]
# } catch (Diluculum::LuaSyntaxError err) {
# ^~~
# 132| errorMsg = string(err.what());
# 133| return fileOK=false;
# 134|-> } catch (Diluculum::LuaSyntaxError err) {
# 135| errorMsg = "syntax error: "+string(err.what());
# 136| return fileOK=false;
Error: UNINIT_CTOR (CWE-456): [#def40]
highlight-3.42/src/include/xterm256generator.h:113: member_decl: Class member declaration for "canvasPadding".
highlight-3.42/src/core/xterm256generator.cpp:47: uninit_member: Non-static class member "canvasPadding" is not initialized in this constructor nor in any functions that it calls.
# 45| spacer = " ";
# 46| maskWs=true; // needed if canvasPadding > 0; requires tab replacement
# 47|-> }
# 48|
# 49| Xterm256Generator::~Xterm256Generator() {}
Error: COMPILER_WARNING: [#def41]
highlight-3.42/src/gui-qt/mainwindow.cpp: scope_hint: In member function 'bool MainWindow::loadFileTypeConfig()'
highlight-3.42/src/gui-qt/mainwindow.cpp:533:34: warning: catching polymorphic type 'class Diluculum::LuaError' by value [-Wcatch-value=]
# } catch (Diluculum::LuaError err) {
# ^~~
# 531| idx++;
# 532| }
# 533|-> } catch (Diluculum::LuaError err) {
# 534| QMessageBox::warning(this, "Configuration error", QString::fromStdString( err.what()));
# 535| return false;
Error: COMPILER_WARNING: [#def42]
highlight-3.42/src/gui-qt/mainwindow.cpp: scope_hint: In member function 'void MainWindow::on_lvUserScripts_itemClicked(QListWidgetItem*)'
highlight-3.42/src/gui-qt/mainwindow.cpp:1440:35: warning: catching polymorphic type 'class Diluculum::LuaError' by value [-Wcatch-value=]
# } catch (Diluculum::LuaError err) {
# ^~~
# 1438| scriptWatcher.removePath(scriptPath);
# 1439| }
# 1440|-> } catch (Diluculum::LuaError err) {
# 1441| QMessageBox::warning(this, "User script error", QString::fromStdString( err.what()));
# 1442| }
Error: COMPILER_WARNING: [#def43]
highlight-3.42/src/gui-qt/mainwindow.cpp: scope_hint: In member function 'void MainWindow::on_lvPluginScripts_itemClicked(QListWidgetItem*)'
highlight-3.42/src/gui-qt/mainwindow.cpp:1462:34: warning: catching polymorphic type 'class Diluculum::LuaError' by value [-Wcatch-value=]
# } catch (Diluculum::LuaError err) {
# ^~~
# 1460| ui->lblPluginDescription->setText(QString::fromStdString(ls["Description"].value().asString()));
# 1461| statusBar()->showMessage(tr("Some plug-in effects may not be visible in the preview."));
# 1462|-> } catch (Diluculum::LuaError err) {
# 1463| QMessageBox::warning(this, "Plug-In error", QString::fromStdString( err.what()));
# 1464| }
Error: UNINIT_CTOR (CWE-456): [#def44]
highlight-3.42/src/include/rtfgenerator.h:43: member_decl: Class member declaration for "width".
highlight-3.42/src/include/rtfgenerator.h:49: uninit_member: Non-static class member "width" is not initialized in this constructor nor in any functions that it calls.
highlight-3.42/src/include/rtfgenerator.h:45: member_decl: Class member declaration for "height".
highlight-3.42/src/include/rtfgenerator.h:49: uninit_member: Non-static class member "height" is not initialized in this constructor nor in any functions that it calls.
# 47| PageSize()
# 48| {
# 49|-> }
# 50|
# 51| /** Constructor to define page dimensions