fsck.minix: remove unnecessary memset calls
PATCH 1/1 fsck.minix: remove unnecessary memset calls
The program aborts without using this unintialized allocated memory, setting to zero doesn't look needed.
memset calls with sizeof() of pointer as argument (reported by clang).
--- disk-utils/fsck.minix.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
disk-utils/fsck.minix.c +0 -2
@@ -611,8 +611,6 @@ read_tables(void) { zone_map =malloc (zmaps *MINIX_BLOCK_SIZE );if (!inode_map)die (_ ("Unable to allocate buffer for zone map" )); -memset (inode_map,0 ,sizeof (inode_map)); -memset (zone_map,0 ,sizeof (zone_map)); inode_buffer =malloc (buffsz);if (!inode_buffer)die (_ ("Unable to allocate buffer for inodes" ));
Signature · 1 line
1.7.3.4
PATCH 1/1 libblkid: silence a format string warning
Fix the following clang warning:
exfat.c:130:41: warning: conversion specifies type 'unsigned short' but the argument has type 'uint8_t' (aka 'unsigned char') [-Wformat]
blkid_probe_sprintf_version(pr, "%hu.%hu",
~~^
%c--- libblkid/src/superblocks/exfat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
libblkid/src/superblocks/exfat.c +1 -1
@@ -127,7 +127,7 @@ static int probe_exfat(blkid_probe pr, const struct blkid_idmag *mag) sb->volume_serial[3 ], sb->volume_serial[2 ], sb->volume_serial[1], sb->volume_serial[0]); -blkid_probe_sprintf_version (pr,"%hu.%hu" , +blkid_probe_sprintf_version (pr,"%u.%u" , sb->version.major, sb->version.minor);return 0 ;
Signature · 1 line
1.7.3.4
PATCH 1/1 whereis: remove unused value warning
In reply to Francesco Cosoleto--- misc-utils/whereis.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
misc-utils/whereis.c +1 -1
@@ -268,7 +268,7 @@ static void fillpath(void)return ; pathcp =xstrdup (path); -for (tmp = pathcp; ;tmp =NULL , tok) { +for (tmp = pathcp; ; tmp =NULL ) { tok =strtok_r (tmp,":" , &key);if (!tok)break ;
Signature · 1 line
1.7.3.4
PATCH 1/1 whereis: silence comparison between signed/unsigned warning
In reply to Francesco Cosoleto--- misc-utils/whereis.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
misc-utils/whereis.c +1 -1
@@ -241,7 +241,7 @@ findin(char *dir, char *cp)static int inpath (const char *str) { -int i; +size_t i;for (i =0 ; i <ARRAY_SIZE (bindirs) -1 ; i++)if (!strcmp (bindirs[i], str))
Signature · 1 line
1.7.3.4
Karel Zak
maintainerRe: [PATCH] whereis: silence comparison between signed/unsigned warning
All your patches applied, except this one.
Quoted 10 lines · Francesco Cosoleto
Signed-off-by Francesco Cosoleto <[email protected]>--- misc-utils/whereis.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)misc-utils/whereis.c +0
-0
misc-utils/whereis.c findin(char *dir, char *cp) · line 244
Quoted 5 lines
misc-utils/whereis.c +1
-1@@ -241,7 +241,7 @@ findin(char *dir, char *cp)static int inpath (const char *str) { -int i; +size_t i;
It seems that your git tree is not up to date, this problem has been already fixed:
$ git blame -L244,+1 misc-utils/whereis.c cc69f339 (Karel Zak 2011-08-31 11:58:01 +0200 244) size_t i;
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com