All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

Analyze C code and return the contents of all the functions

I am not sure if a software for this exists or not. But I want a tool which looks at C code and returns a data structure like a hashmap, where the key is the name of the function and the value is the ...
1
vote
0answers
16 views

Static code Analysis tool for C Source Code with MISRA Compliance to embed within C# Project

I have a Console Application written in C#. Here, I should embed a Static Code Analyser tool within C# Console Application which should analyse C Code.(here, .c and .h file(s) will be given as input ...
2
votes
1answer
34 views

Tool to automatically apply 'const' to C code

We are planning to make better use of the const qualifier in our C code. To speed this up for our existing codebase, I'm looking for a tool that automatically applies const to function parameters ...
3
votes
0answers
26 views

Detect union access errors in C

Let's say I have a variant type in C implemented as an annotated union: enum var_mode { TYPE_A, TYPE_B }; union var_data { int a; double b; }; struct var_type { enum var_mode ...
7
votes
1answer
132 views

Is there a code analysis tool that can reduce my conditional branching?

I want to reduce the deep nested branching of this C code and I wonder if there is an analysis tool that can make a truth table for the conditions or if I must analyze it manually? I'd like to make ...
0
votes
1answer
78 views

Get the function for a specific line in a C source file [closed]

Is there some tool which I could use to find out the function name to which a specified source line number belongs? Example file: static enum foo bar(int c) { if (c < 30) return B1; ...
3
votes
2answers
351 views

What are some C/C++ static analysis tools for finding dependencies in code?

I am looking for a tool that would analyze C/C++ code on windows and should be able capture reads and writes to variables by different functions. For example: //in file1.c extern int a; write_to_a(){...
1
vote
2answers
51 views

Find calls to typed functions which do not check the return value

I want a tool to parse C / C++ (others welcome, particularly PHP, but C / C++ == priority) and find calls to typed functions which do not check the return value. I don't see a g++ option (does MS ...
1
vote
2answers
128 views

C code for evaluating static code analysis tools

So, I am switching back to C coding soon. I have previous experience of Gimpel Lint and Splint, but would like to check out a few others. Does anyone know of some C code which is specifically ...
2
votes
1answer
51 views

Find all uses of a variable in code

I am aware that some IDEs, like MS Studio have an option to find all uses of a variable in code. However, from what I can see, that finding stops when you pass a variable as a parameter to a function....
1
vote
0answers
45 views

3D velocity distribution generator

Is there a library written in C or C++ or Fortran that gives the Maxwellian velocity (3D) distribution of a diatomic gas? If the code is available it is even better
10
votes
3answers
1k views

Find dead code in a C program by runtime analysis

I have a large application written in C + POSIX there are many functions which are never called inside it. However, due to the size of the code it is difficult to track them manually. Some people have ...