Skip to content

General

26 results found

  1. Have restore at end reset the internal counter of -esym

    Right now, this works correctly only for -e#, but very often, programmers make mistakes using -esym as well.
    Would be nice to not have to debug those using -voif.
    Example:

    @module foo.cpp
    namespace test
    {
    extern bool bar(void);
    extern bool flag;

    bool foo(void)
    {
    //the next line is a programmer mistake which is carried on into bar.cpp despite using -restoreatend
    //lint -esym(1960,5-14-1)
    return flag && bar();
    }
    }

    @module bar.cpp
    namespace test
    {
    extern bool foo(void);
    extern bool flag;

    bool bar(void)
    {
    // Violates 5-14-1 but is not reported due to error in previous module
    return flag &&…

    1 vote
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  2. Error 305: Unable to open module 'Files'

    Minor irritation, unclear error message: Using separate directories for exe and lint files creates the following problem unless the path variable is also set to the exe location. Not clear exactly which files lint requires, so have to copy all over (don't want path modified).
    c:\"Program Files (x86)\pc-lint 9.0"\lint-nt -v
    PC-lint for C/C++ (NT) Vers. 9.00L, Copyright Gimpel Software 1985-2014
    Error 305: Unable to open module 'Files'

    1 vote
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  3. Extend value tracking for member variables/functions

    include <string.h>

    //lint -passes(2)
    class X
    {
    int *p;
    public:
    X(){ p = NULL; }
    bool IsValid()const{return p != NULL;}
    void Foo()
    {
    if(IsValid())
    *p = 0; // Warning 613: Possible use of null pointer (wrong)
    }
    void Bar()
    {
    if(p != NULL)
    *p = 0; // no 613 here (ok)
    }
    };

    // Value tracking works for global variables (ok)
    int pg = NULL;
    bool IsValid(const int
    px)
    {
    return px != NULL;
    }
    void Bar()
    {
    if(IsValid(pg))
    *pg = 0;// no 613 here (ok)
    }

    1 vote
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  4. Add support for MISRA C 2012 addendum 1

    automotive industry requirement to comply with additional 16 rules documented in the addendum

    1 vote
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    completed  ·  0 comments  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  5. Wrong suggestion on how to export environment variables on Linux

    This article explains how to create environment variables on Linux. It wrongly suggests:

    export INCLUDE=/usr/local/include;/usr/include

    but the correct way is as followed (replace ';' by ':' between paths):

    export INCLUDE=/usr/local/include:/usr/include

    Best regards

    Martin Ettl

    1 vote
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  6. Please add an _optional_ (not on by default) warning to find use of catch (...)

    I'd like you to consider adding a optional warning for the "catch all uncaught exceptions" clause, catch with a 3 dot ellipsis:

    catch (...)

    This can be a dangerous construct certainly on some of the Microsoft compilers with interactions with Structured Exception Handling, and is warned against by a number of key figures, including John Robbins.

    1 vote
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
2 Next →
  • Don't see your idea?

General

Categories

Feedback and Knowledge Base