Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Static Analysis Report

Static Analysis Report

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kumararajas
    wrote on last edited by
    #1

    Hello,

    I ran the static analysis tool on my code. Since my code includes Qt libraries, it also analyses the header files. Tool has caught couple of warnings from the Qt sources.
    I am using Qt 4.8.
    Any thoughts if these are harmful? Should I need to get them fixed? if yes, how?

    CL.MLK.ASSIGN: Possible memory leak in class 'QDebug'. Dynamic memory stored in 'stream' can be lost. : C and C++ : qdebug.h : Warning (3) : Analyze : Local
    CWARN.BITOP.SIZE: Operands in a bitwise operation have different size : C and C++ : qglobal.h : Review (4) : Analyze : Local
    CWARN.BITOP.SIZE: Operands in a bitwise operation have different size : C and C++ : qglobal.h : Review (4) : Analyze : Local
    CWARN.MEM.NONPOD: Memory manipulation routine 'memcpy' is applied to a non-POD object : C and C++ : qvector.h : Review (4) : Analyze : Local
    CWARN.MEM.NONPOD: Memory manipulation routine 'memcpy' is applied to a non-POD object : C and C++ : qlist.h : Review (4) : Analyze : Local
    

    Thanks,
    Kumara

    --Kumar

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK:

      • stream is handled properly
      • sign extension must be taken into account when using the flag bitwise operator
      • IIRC, memcopy is used on classes that can be copied through it

      As for fixes of Qt 4, AFAIK only security fixes will get in.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved