Util-Linux package development
 help / color / mirror / Atom feed
* [PATCH 0/7] pull: make smatch scan output easy to digest
@ 2017-02-13 22:06 Sami Kerola
  2017-02-13 22:06 ` [PATCH 1/7] cfdisk: avoid use of VLA in combination with sizeof() [smatch scan] Sami Kerola
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Sami Kerola @ 2017-02-13 22:06 UTC (permalink / raw)
  To: util-linux; +Cc: Sami Kerola

Hello,

I have had habit running smatch agains the project occasionally, and output
has always been noisy to the point not seeing the forest for the trees. 
This pull attempts to fix some genuine issues found with smatch, and trivial
warnings so that there is a lot less to digest when doing static analysis.

Changes 0002, 0003, and 0004 fall into later category -- and that is the
only justification they stand for.  Admittedly changing 0's to NULL has no
technical difference, but I do hope having this change encourages more
regular smatching of the code.

p.s.  I chose to refer patches 0002 and 0003 to avoid sending 150kb emails
to everyone on list.  Please see them from my remote repository instead, the
patch mails has direct link to github or you can add my remote branch using
details below.

----------------------------------------------------------------
The following changes since commit b192dd6943e5bb5d2a3773b2c9b06cbd4eb28258:
  lib/randutils: glibc 2.25 has getrandom(2) declaration (2017-02-13 14:14:28 +0100)
are available in the git repository at:
  git://github.com/kerolasa/lelux-utiliteetit.git smatch-fixes
for you to fetch changes up to ffd1a3c942bfe4dbf59584954a4eb0bf09c6b89b:
  findmnt: fix couple memory leaks [cppcheck] (2017-02-13 21:19:52 +0000)
----------------------------------------------------------------

Sami Kerola (7):
  cfdisk: avoid use of VLA in combination with sizeof() [smatch scan]
  misc: do not use plain 0 as NULL [smatch scan]
  misc: add static keyword to where needed [smatch scan]
  misc: unify function declarations [smatch scan]
  lib/idcache: add void to function declaration [smatch scan]
  libblkid: declare across file variables in blkidP.h [smatch scan]
  findmnt: fix couple memory leaks [cppcheck]

 Documentation/boilerplate.c           |  18 +++---
 disk-utils/addpart.c                  |   6 +-
 disk-utils/cfdisk.c                   |  15 +++--
 disk-utils/delpart.c                  |   6 +-
 disk-utils/fdformat.c                 |   2 +-
 disk-utils/fdisk-menu.c               |  16 ++---
 disk-utils/fsck.c                     |  26 ++++----
 disk-utils/fsck.cramfs.c              |  22 +++----
 disk-utils/isosize.c                  |  10 +--
 disk-utils/mkfs.cramfs.c              |   6 +-
 disk-utils/mkswap.c                   |  18 +++---
 disk-utils/partx.c                    |   4 +-
 disk-utils/raw.c                      |  18 +++---
 disk-utils/resizepart.c               |   6 +-
 disk-utils/sfdisk.c                   |   4 +-
 disk-utils/swaplabel.c                |  10 +--
 include/pt-mbr-partnames.h            |   2 +-
 lib/colors.c                          |   2 +-
 lib/exec_shell.c                      |   2 +-
 lib/idcache.c                         |   2 +-
 lib/loopdev.c                         |   2 +-
 lib/randutils.c                       |   4 +-
 lib/timer.c                           |   2 +-
 libblkid/src/blkidP.h                 |   5 ++
 libblkid/src/dev.c                    |   6 +-
 libblkid/src/devname.c                |  12 ++--
 libblkid/src/probe.c                  |   5 --
 libblkid/src/read.c                   |   6 +-
 libblkid/src/resolve.c                |   2 +-
 libblkid/src/superblocks/drbdmanage.c |   2 +-
 libblkid/src/superblocks/vfat.c       |   2 +-
 libblkid/src/tag.c                    |  12 ++--
 libblkid/src/topology/evms.c          |   2 +-
 libblkid/src/verify.c                 |   4 +-
 libfdisk/src/bsd.c                    |   2 +-
 libfdisk/src/context.c                |   4 +-
 libfdisk/src/sun.c                    |   2 +-
 libmount/python/context.c             |  46 +++++++-------
 libmount/python/fs.c                  |  46 +++++++-------
 libmount/python/pylibmount.c          |   2 +-
 libmount/python/tab.c                 |  46 +++++++-------
 libuuid/src/gen_uuid.c                |  10 +--
 login-utils/chfn.c                    |  14 ++---
 login-utils/chsh.c                    |  12 ++--
 login-utils/nologin.c                 |   6 +-
 login-utils/su-common.c               |   9 ++-
 login-utils/sulogin.c                 |  22 +++----
 login-utils/utmpdump.c                |  12 ++--
 login-utils/vipw.c                    |  11 ++--
 misc-utils/blkid.c                    |   2 +-
 misc-utils/cal.c                      |   4 +-
 misc-utils/findmnt-verify.c           |  10 +--
 misc-utils/findmnt.c                  |  78 +++++++++++------------
 misc-utils/getopt.c                   |   4 +-
 misc-utils/kill.c                     |   2 +-
 misc-utils/look.c                     |  18 +++---
 misc-utils/lsblk.c                    |  64 +++++++++----------
 misc-utils/namei.c                    |  18 +++---
 misc-utils/whereis.c                  |   2 +-
 misc-utils/wipefs.c                   |  22 +++----
 schedutils/ionice.c                   |   2 +-
 sys-utils/blkdiscard.c                |  18 +++---
 sys-utils/chcpu.c                     |  18 +++---
 sys-utils/eject.c                     |   4 +-
 sys-utils/fallocate.c                 |  26 ++++----
 sys-utils/flock.c                     |   2 +-
 sys-utils/fsfreeze.c                  |  10 +--
 sys-utils/fstrim.c                    |  16 ++---
 sys-utils/hwclock-cmos.c              |  26 ++++----
 sys-utils/hwclock.c                   |  71 +++++++++++----------
 sys-utils/hwclock.h                   |   7 ++-
 sys-utils/ipcs.c                      |   2 +-
 sys-utils/losetup.c                   |  44 ++++++-------
 sys-utils/lscpu.c                     |  36 +++++------
 sys-utils/lsipc.c                     |  42 ++++++-------
 sys-utils/lsns.c                      |   4 +-
 sys-utils/mount.c                     |  68 ++++++++++----------
 sys-utils/mountpoint.c                |  14 ++---
 sys-utils/prlimit.c                   |   2 +-
 sys-utils/readprofile.c               |   6 +-
 sys-utils/renice.c                    |   2 +-
 sys-utils/rtcwake.c                   |  32 +++++-----
 sys-utils/setpriv.c                   |  44 ++++++-------
 sys-utils/swapoff.c                   |  10 +--
 sys-utils/swapon.c                    |  34 +++++-----
 sys-utils/tunelp.c                    |  22 +++----
 sys-utils/umount.c                    |  34 +++++-----
 sys-utils/unshare.c                   |  34 +++++-----
 term-utils/agetty.c                   |  86 ++++++++++++-------------
 term-utils/mesg.c                     |   8 +--
 term-utils/script.c                   |   2 +-
 term-utils/setterm.c                  |   2 +-
 term-utils/wall.c                     |  12 ++--
 text-utils/col.c                      |  34 +++++-----
 text-utils/colcrt.c                   |   2 +-
 text-utils/colrm.c                    |   6 +-
 text-utils/column.c                   |  22 +++----
 text-utils/more.c                     | 115 +++++++++++++++++-----------------
 text-utils/pg.c                       |  64 +++++++++----------
 text-utils/rev.c                      |   8 +--
 text-utils/tailf.c                    |  10 +--
 text-utils/ul.c                       |  55 ++++++++--------
 102 files changed, 895 insertions(+), 890 deletions(-)

-- 
2.11.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-02-26  4:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-13 22:06 [PATCH 0/7] pull: make smatch scan output easy to digest Sami Kerola
2017-02-13 22:06 ` [PATCH 1/7] cfdisk: avoid use of VLA in combination with sizeof() [smatch scan] Sami Kerola
2017-02-13 22:06 ` Sami Kerola
2017-02-13 22:06 ` [PATCH 3/7] misc: add static keyword to where needed " Sami Kerola
2017-02-13 22:06 ` [PATCH 4/7] misc: unify function declarations " Sami Kerola
2017-02-13 22:06 ` [PATCH 5/7] lib/idcache: add void to function declaration " Sami Kerola
2017-02-13 22:06 ` [PATCH 6/7] libblkid: declare across file variables in blkidP.h " Sami Kerola
2017-02-13 22:06 ` [PATCH 7/7] findmnt: fix couple memory leaks [cppcheck] Sami Kerola
2017-02-20 12:14 ` [PATCH 0/7] pull: make smatch scan output easy to digest Karel Zak
2017-02-20 22:12   ` Sami Kerola
2017-02-21  9:50     ` Karel Zak
2017-02-24  0:37       ` Dan Carpenter
2017-02-25 17:32         ` Sami Kerola
2017-02-25 20:09           ` Dan Carpenter
2017-02-26  4:07           ` Luc Van Oostenryck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox