How to Install and Uninstall cppcheck Package on openSUSE Leap

Last updated: May 04,2024

1. Install "cppcheck" package

Please follow the instructions below to install cppcheck on openSUSE Leap

$ sudo zypper refresh $ sudo zypper install cppcheck

2. Uninstall "cppcheck" package

Learn how to uninstall cppcheck on openSUSE Leap:

$ sudo zypper remove cppcheck

3. Information about the cppcheck package on openSUSE Leap

Information for package cppcheck:
---------------------------------
Repository : Update repository of openSUSE Backports
Name : cppcheck
Version : 2.12.1-bp155.2.3.1
Arch : x86_64
Vendor : openSUSE
Installed Size : 10.0 MiB
Installed : No
Status : not installed
Source package : cppcheck-2.12.1-bp155.2.3.1.src
Upstream URL : https://github.com/danmar/cppcheck
Summary : A tool for static C/C++ code analysis
Description :
This program tries to detect bugs that your C/C++ compiler don't see. Cppcheck
is versatile. You can check non-standard code that includes various compiler
extensions, inline assembly code, etc. Checking covers for example these
errors:
* Out of bounds
* Uninitialized member variable 'classname::varname'
* Using 'memfunc' on class
* Using 'memfunc' on struct that contains a 'std::classname'
* Class Base which is inherited by class Derived does not have a virtual
destructor
* Memory leak: varname
* Resource leak: varname
* Deallocating a deallocated pointer: varname
* Using 'varname' after it is deallocated / released
* Invalid radix in call to strtol or strtoul. Must be 0 or 2-36
* Overlapping data buffer varname
* Unsigned division. The result will be wrong.
* Unusual pointer arithmetic