search for: cppcheck

Displaying 20 results from an estimated 48 matches for "cppcheck".

2011 Mar 14
1
cppcheck and btrfs
Hi Chris, et. al, I''ve recently come across cppcheck (static analyser for C code) and ran it on the current btrfs directory from Linus''s repo and it''s reported the following potential issues: linux-2.6$ cppcheck -q fs/btrfs/ [fs/btrfs/compression.c:343]: (error) Data is allocated but not initialized: cb [fs/btrfs/compression.c:583...
2017 Jan 19
1
[PATCH] Fix cppcheck warnings
fedora comes with 1.75 so I used that. I also used some additional flags: cppcheck --enable=all --inconclusive --std=posix --force On Wed, Jan 18, 2017 at 11:36 PM, Erik de Castro Lopo <mle+la at mega-nerd.com> wrote: > Rosen Penev wrote: > >> src/libFLAC/bitreader.c | 4 ++-- >> src/libFLAC/bitwriter.c | 4 ++-- >> src/plugin_xmms/...
2010 Jan 19
1
static analysis tool cppcheck meets the btrfs code - four issues
Hello there, I just ran the sourceforge tool cppcheck over the source code of the new Linux kernel 2.6.32.4 It said 1. [./btrfs/free-space-cache.c:600]: (style) Redundant condition. It is safe to deallocate a NULL pointer The source code is                 if (info->bitmap)                         kfree(info->bitmap); I agree with cppcheck...
2017 Jan 19
4
[PATCH] Fix cppcheck warnings
--- src/libFLAC/bitreader.c | 4 ++-- src/libFLAC/bitwriter.c | 4 ++-- src/plugin_xmms/plugin.c | 2 +- src/share/utf8/charset.c | 1 + src/test_libFLAC++/encoders.cpp | 8 ++++---- src/test_libFLAC/decoders.c | 4 ++-- src/test_libFLAC/encoders.c | 8 ++++---- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/libFLAC/bitreader.c
2016 Nov 16
2
Highlighting trailing whitespaces on Phab?
...book/phabricator/article/arcanist_lint/). This will enforce the check when `arc diff` is run (reviewers wouldn't see the warnings though). There are two linters we might be interested in enabling: - cpplint (code style checker based on cpplint.py <https://github.com/google/styleguide>) - cppcheck (C++ linter based on cppcheck <http://cppcheck.sourceforge.net/>) Note that cpplint assumes google code style, but I think it can potentially be replaced it with clang-format with configurable code styles. On Wed, Nov 16, 2016 at 12:28 PM Eric Liu <ioeric at google.com> wrote: I'...
2014 Feb 02
1
PATCH: Fix typo in conditional
...check the exit condition in ascii_strcasecmp in share/utf8/charset.c. It checks for (!*s1 || !*s1) instead of (!*s1 || !*s2). Attached patch fixes this. Note that the typo did not affect the result of the function as the loop is exited before changing s1 or s2 anyway. The problem was found by cppcheck which is run automatically on the Debian sources. Results here: http://cppcheck.sourceforge.net/devinfo/daca2-cppcheck1.63/daca2.html Best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: flac-1.3.0-charset.patch Type: text/x-patch Size: 390 byt...
2011 Oct 14
2
[PATCH] Fix logic error in rhino driver
The if() statement always evaluated to true. Detected by "cppcheck", not tested on real hardware. Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com> --- drivers/rhino.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/rhino.c b/drivers/rhino.c index ca66169..e478bcb 100644 --- a/drivers/rhino.c +++ b/drive...
2016 Nov 16
2
Highlighting trailing whitespaces on Phab?
...force the check when `arc diff` is run (reviewers wouldn't see the >> warnings though). >> >> There are two linters we might be interested in enabling: >> - cpplint (code style checker based on cpplint.py >> <https://github.com/google/styleguide>) >> - cppcheck (C++ linter based on cppcheck <http://cppcheck.sourceforge.net/>) >> >> Note that cpplint assumes google code style, but I think it can potentially >> be replaced it with clang-format with configurable code styles. >> >> On Wed, Nov 16, 2016 at 12:28 PM Eric Li...
2017 Oct 13
0
Wine release 2.19
...redefine REFERENCE_TIME if it's already defined. regedit: Don't crash if REG_SZ is empty. midimap: Add warning for user in case midi won't work. wpcapi.idl: Fix IWindowsParentalControls UUID. secur32: In LsaLookupAuthenticationPackage properly set out parameter (cppcheck). winedump: Fix potential null-pointer dereference (cppcheck). inetcomm: In SMTPTransport_ParseResponse remove unneeded statement (cppcheck). oleaut32: In userdefined_to_variantvt remove unneeded statement (cppcheck). wineandroid.drv: In AudioClient_IsFormatSupported remove...
2014 Oct 31
0
Wine release 1.7.30
...ing it. wininet: Fix InternetGetConnectedStateEx[A|W]. regedit: Append exported strings using the correct size. regedit: Allow importing strings with escaped NULL. regedit: Allow importing/exporting strings with '\r'. advapi32/tests: Fix copy & paste issue (Cppcheck). advapi32/tests: Remove dead assignment (Cppcheck). advpack/tests: Remove dead assignment (Cppcheck). atl: Remove dead assignment. atl: Remove dead assignment. comctl32: Remove a dead assignment in comctl32undoc.c (Cppcheck). comctl32: Avoid magic numbers....
2015 Jul 11
0
EXTLINUX - GCC 5
...UX bootable on some machines and not on others ? Does one machine build good ISOs with gcc5 and the other produces bad ones ?) My best theory is still that SYSLINUX would have some C code parts which allow the compilers to produce non-equivalent machine code. I see complaints in the output of cppcheck 1.67, which could match this criterium. (Maybe one should subscribe SYSLINUX to Coverty Scan ?) ----------------------------------------------------------------- [com32/gpllib/dmi/dmi_memory.c:205]: (error) Undefined behavior: Variable 'type' is used as parameter and destination in s[n]...
2013 Oct 08
1
nut-2.6.5:rhino.c:190: bad if test ?
Hello there, Offending source code is ????? if(? ( BattVoltage> 129 ) || ( BattVoltage < 144 ) ) Maybe swap || for && would be better. This problem I found by using cppcheck. It said [rhino.c:190]: (warning) Logical disjunction always evaluates to true: BattVoltage> 129 || BattVoltage < 144. Regards David Binderman
2019 Feb 17
0
[ANNOUNCE] xcalc 1.0.7
xcalc is a scientific calculator X11 client that can emulate a TI-30 or an HP-10C. This release fixes things that cause warnings from gcc or cppcheck, as well as assorted build system maintenance and tuneups. Alan Coopersmith (5): Fix misleading indentation in math.c Reword fall through comments to appease gcc -Wimplicit-fallthrough Update README for gitlab migration Update configure.ac bug URL for gitlab migration...
2016 Nov 16
2
Highlighting trailing whitespaces on Phab?
On 11/14, Mehdi Amini via llvm-dev wrote: > Ideally I’d even really like to have a both checking for revision on > phab, clang-formatting them, and post a comment when there is a > mismatch :) I'd like that! -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 195 bytes Desc: Digital signature URL:
2015 Jul 11
3
EXTLINUX - GCC 5
> On Jul 10, 2015 5:29 PM, "poma via Syslinux" <syslinux at zytor.com> wrote: > > > The same as with the ISOLINUX, stable and git. > > Only this time has nothing to do with the menu. > > 1) EXTLINUX is no longer a discrete variant. The installer extlinux now > installs SYSLINUX. > 2) William Kensington already saw a similar behavior wherein an
2014 Nov 14
0
Wine release 1.7.31
...msi: Add stubs for MsiRemovePatches(A/W). ntoskrnl.exe: Add a stub for IoRegisterPlugPlayNotification. shell32: Add a stub for RegenerateUserEnvironment. ntdll: Add stubs for vectored continue handler. Bruno Jesus (12): comctl32/tests: Remove dead assignments in treeview.c (Cppcheck). comctl32/tests: Remove a dead assignment in misc.c (Cppcheck). mciavi32: Initialize a variable (Cppcheck). crypt32: Remove dead assignments in cert.c (Cppcheck). compobj.dll16: Remove dead assignments in compobj.c (Cppcheck). ws2_32: Add tests and implement inet_pton...
2015 Jul 11
1
EXTLINUX - GCC 5
Thomas Schmitt via Syslinux <syslinux at zytor.com> writes: > My best theory is still that SYSLINUX would have some C code > parts which allow the compilers to produce non-equivalent > machine code. > > I see complaints in the output of cppcheck 1.67, which could > match this criterium. Nice list, thanks! By then way there are known errors in the library code, too, see for example the short thread starting at http://www.syslinux.org/archives/2014-July/022394.html. Unfortunately I still haven't got the heart (and time) to tackle up...
2013 Jun 28
1
version 2.3.3, file log.c bug report
Hello there, I just ran the static analysis checker "cppcheck" over the source code of icecast version 2.3.3 Amongst many other things, it said [log.c:301]: (warning) Logical conjunction always evaluates to false: log_id < 0 && log_id>= 25. Source code is ??? if (log_id < 0 && log_id>= LOG_MAXLOGS) ??????? return; Suggest...
2011 Aug 27
1
[PATCH 2/3] Fix use of uninitialized variable
Credit goes to "cppcheck". Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com> --- drivers/mge-utalk.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/mge-utalk.c b/drivers/mge-utalk.c index c6114c7..616e2ad 100644 --- a/drivers/mge-utalk.c +++ b/drivers/mge-utalk...
2011 Aug 27
1
[PATCH 3/3] Fix pointer check on wrong variable
Credit goess to "cppcheck" Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com> --- drivers/usb-common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb-common.c b/drivers/usb-common.c index e51f3cf..e459872 100644 --- a/drivers/usb-common.c +++ b/drivers/usb-com...