HerbertKoelman / cpp-atmi

Application-to-Transaction Monitor Interface (ATMI) C++ library
http://herbertkoelman.github.com/cpp-atmi
Other
7 stars 0 forks source link

cppcheck repport #59

Closed HerbertKoelman closed 8 years ago

HerbertKoelman commented 8 years ago
cppcheck --template='{file}:{line},{severity},{id}:\n    {message}\n' --enable=all -I include ./src
Checking src/abstract_client.cpp...
include/atmi/buffers.hpp:468,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

include/atmi/buffers.hpp:508,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

include/atmi/buffers.hpp:702,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

include/atmi/buffers.hpp:857,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

include/atmi/buffers.hpp:239,style,noConstructor:
    The class 'field' does not have a constructor.

include/atmi/tuxedo.hpp:327,warning,duplInheritedMember:
    The class 'queue_stream' defines member variable with name '_flags' also defined in its parent class 'tuxedo'.

include/atmi/logger.hpp:136,style,noExplicitConstructor:
    Class 'ulog_logger' has a constructor with 1 argument that is not explicit.

include/atmi/tuxedo.hpp:780,style,noExplicitConstructor:
    Class 'event' has a constructor with 1 argument that is not explicit.

include/atmi/tuxedo.hpp:815,style,noExplicitConstructor:
    Class 'queue_stream' has a constructor with 1 argument that is not explicit.

include/atmi/buffers.hpp:390,style,noExplicitConstructor:
    Class 'Tfield' has a constructor with 1 argument that is not explicit.

include/atmi/buffers.hpp:417,style,noExplicitConstructor:
    Class 'Tfield' has a constructor with 1 argument that is not explicit.

Checking src/abstract_client.cpp: HAVE_CPP11_MUTEX...
1/14 files checked 7% done
Checking src/abstract_server.cpp...
Checking src/abstract_server.cpp: HAVE_CPP11_MUTEX...
2/14 files checked 14% done
Checking src/atmi++.cpp...
Checking src/atmi++.cpp: HAVE_CPP11_MUTEX...
3/14 files checked 21% done
Checking src/buffer.cpp...
src/buffer.cpp:228,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

Checking src/buffer.cpp: HAVE_CPP11_MUTEX...
4/14 files checked 28% done
Checking src/event.cpp...
Checking src/event.cpp: HAVE_CPP11_MUTEX...
5/14 files checked 35% done
Checking src/exceptions.cpp...
Checking src/exceptions.cpp: HAVE_CPP11_MUTEX...
6/14 files checked 42% done
Checking src/field.cpp...
src/field.cpp:60,error,stlcstr:
    Dangerous usage of c_str(). The value returned by c_str() is invalid after this call.

src/field.cpp:105,error,va_end_missing:
    va_list 'ap' was opened but not closed by va_end().

Checking src/field.cpp: HAVE_CPP11_MUTEX...
7/14 files checked 50% done
Checking src/logger.cpp...
8/14 files checked 57% done
Checking src/queue.cpp...
src/queue.cpp:97,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

src/queue.cpp:173,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

Checking src/queue.cpp: HAVE_CPP11_MUTEX...
9/14 files checked 64% done
Checking src/queue_stream.cpp...
src/queue_stream.cpp:51,style,variableScope:
    The scope of the variable 'rc' can be reduced.

src/queue_stream.cpp:122,style,variableScope:
    The scope of the variable 'rc' can be reduced.

src/queue_stream.cpp:84,error,mismatchAllocDealloc:
    Mismatching allocation and deallocation: buffer

src/queue_stream.cpp:85,error,mismatchAllocDealloc:
    Mismatching allocation and deallocation: buffer

src/queue_stream.cpp:108,error,mismatchAllocDealloc:
    Mismatching allocation and deallocation: buffer

src/queue_stream.cpp:113,error,mismatchAllocDealloc:
    Mismatching allocation and deallocation: buffer

Checking src/queue_stream.cpp: HAVE_CPP11_MUTEX...
10/14 files checked 71% done
Checking src/standard_logger.cpp...
11/14 files checked 78% done
Checking src/transaction.cpp...
src/transaction.cpp:37,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

src/transaction.cpp:68,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

src/transaction.cpp:78,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

src/transaction.cpp:88,style,redundantAssignment:
    Variable 'ret' is reassigned a value before the old one has been used.

src/transaction.cpp:108,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

src/transaction.cpp:124,style,redundantAssignment:
    Variable 'ret' is reassigned a value before the old one has been used.

Checking src/transaction.cpp: HAVE_CPP11_MUTEX...
12/14 files checked 85% done
Checking src/tuxedo.cpp...
src/tuxedo.cpp:75,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

src/tuxedo.cpp:90,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

src/tuxedo.cpp:105,style,redundantAssignment:
    Variable 'rc' is reassigned a value before the old one has been used.

src/tuxedo.cpp:119,style,variableScope:
    The scope of the variable 'rc' can be reduced.

Checking src/tuxedo.cpp: HAVE_CPP11_MUTEX...
13/14 files checked 92% done
Checking src/ulog_logger.cpp...
14/14 files checked 100% done
src/buffer.cpp:97,style,unusedFunction:
    The function 'append' is never used.

src/transaction.cpp:159,style,unusedFunction:
    The function 'cancel' is never used.

src/atmi++.cpp:28,style,unusedFunction:
    The function 'cpp_atmi_version' is never used.

src/logger.cpp:94,style,unusedFunction:
    The function 'debug' is never used.

src/exceptions.cpp:63,style,unusedFunction:
    The function 'error_detail' is never used.

src/field.cpp:97,style,unusedFunction:
    The function 'ferror_handler' is never used.

src/logger.cpp:81,style,unusedFunction:
    The function 'finer' is never used.

src/logger.cpp:69,style,unusedFunction:
    The function 'info' is never used.

src/buffer.cpp:186,style,unusedFunction:
    The function 'is_handling_memory' is never used.

src/abstract_client.cpp:134,style,unusedFunction:
    The function 'new_queue_instance' is never used.

src/abstract_client.cpp:121,style,unusedFunction:
    The function 'new_transaction_instance' is never used.

src/buffer.cpp:176,style,unusedFunction:
    The function 'num' is never used.

src/field.cpp:33,style,unusedFunction:
    The function 'number' is never used.

src/buffer.cpp:81,style,unusedFunction:
    The function 'pack' is never used.

src/event.cpp:22,style,unusedFunction:
    The function 'post' is never used.

src/buffer.cpp:181,style,unusedFunction:
    The function 'print' is never used.

src/queue.cpp:191,style,unusedFunction:
    The function 'reply_queue' is never used.

src/buffer.cpp:190,style,unusedFunction:
    The function 'set_handling_memory' is never used.

src/queue.cpp:235,style,unusedFunction:
    The function 'set_new_corrid' is never used.

src/abstract_server.cpp:43,style,unusedFunction:
    The function 'tpsvrthrdone' is never used.

src/abstract_server.cpp:47,style,unusedFunction:
    The function 'tpsvrthrinit' is never used.

src/queue.cpp:247,style,unusedFunction:
    The function 'unset_corrid' is never used.

src/buffer.cpp:162,style,unusedFunction:
    The function 'unused' is never used.

src/logger.cpp:57,style,unusedFunction:
    The function 'warning' is never used.

:,information,missingIncludeSystem:
    Cppcheck cannot find all the include files (use --check-config for details)