User Activity

  • Posted a comment on discussion Development on cppcheck

    Congratulations. I wish you the best commercial success on a project you obviously love.

  • Posted a comment on discussion Development on cppcheck

    #include <pthread.h> #include <stdlib.h> struct log { int bob; pthread_mutex_t x; }; void m_init(pthread_mutex_t *x); struct log *f() { struct log x, *y; y = (struct log *) malloc(sizeof(struct log)); x.bob = 3; *y = x; pthread_mutex_init(&y->x, NULL); //m_init(&y->x); return y; } err: Checking /tmp/s.c ... /tmp/s.c:17:7: error: Uninitialized variable: x.x [uninitvar] *y = x; ^ /tmp/s.c:17:7: error: Uninitialized struct member: x.x [uninitStructMember] *y = x; ^

  • Posted a comment on discussion Development on cppcheck

    template <unsigned int width> class Bitmap { static const int BITS_PER_ELEMENT= sizeof(unsigned long long) * 8; static const int ARRAY_ELEMENTS= (width + BITS_PER_ELEMENT - 1) / BITS_PER_ELEMENT; unsigned long long buffer[ARRAY_ELEMENTS]; private: unsigned long long bit_mask(unsigned int n) const { return ARRAY_ELEMENTS == 1 ? 1ULL << n : 1ULL << (n % BITS_PER_ELEMENT); } public: void intersect_and_pad() { if (ARRAY_ELEMENTS > 1 && (width % BITS_PER_ELEMENT)) buffer[ARRAY_ELEMENTS - 1]= bit_mask(width)...

  • Posted a comment on discussion Development on cppcheck

    Thank you.

  • Posted a comment on discussion Development on cppcheck

    reproduceable (preprocessed, not minimized, and slow): I assume there's a way to take output at stages: $ time bin/cppcheck --language=c++ --report-progress ~/repos/build-mariadb-server-10.11/libmysqld/CMakeFiles/sql_embedded.dir/emb_qcache.cc.ii Checking /home/dan/repos/build-mariadb-server-10.11/libmysqld/CMakeFiles/sql_embedded.dir/emb_qcache.cc.ii ... progress: Tokenize (typedef) 0% progress: Tokenize (typedef) 0% progress: Tokenize (typedef) 1% progress: Tokenize (typedef) 5% progress: Tokenize...

  • Posted a comment on discussion Development on cppcheck

    Thanks for fixing.

  • Posted a comment on discussion Development on cppcheck

    using std::trunc; enum { FE_INVALID = 1 }; $ bin/cppcheck /tmp/x.c++ Checking /tmp/x.c++ ... /tmp/x.c++:4:3: error: syntax error: 16 = [syntaxError] { ^ Error from: Tokenizer::findGarbageCode (this=0x7fffffff97a0) at /home/dan/repos/cppcheck/lib/tokenize.cpp:7597 7597 syntaxError(tok, tok->next()->str() + " " + tok->strAt(2)); This is from: #include <math.h> #include <fenv.h> And also: struct __true_type { }; template<typename _Tp> struct __is_move_iterator { enum { __value = 0 }; }; template<typename...

  • Posted a comment on discussion Development on cppcheck

    I haven't yet got a simple reproducer yet. https://github.com/MariaDB/server/blob/10.11/sql/sql_class.h#L334 sql/sql_class.h:334:3: error: syntax error [syntaxError] enum drop_type { KEY, COLUMN, FOREIGN_KEY, CHECK_CONSTRAINT, PERIOD }; ^

View All

Personal Data

Username:
danblackmdb
Joined:
2023-01-13 04:26:32.916000

Projects

  • No projects to display.

Personal Tools