more -Wall warning fixes from Cristian Ionescu-Idbohrn.
This time it resulted in small code changes: function old new delta nexpr 820 828 +8 tail_main 1200 1202 +2 wrapf 166 167 +1 parse_mount_options 227 209 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18) Total: -7 bytes
This commit is contained in:
@@ -65,7 +65,7 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs,
|
||||
ssize_t n = full_write_or_warn(buf, len, filename);
|
||||
if (n < 0)
|
||||
return 1;
|
||||
if (n == obs)
|
||||
if ((size_t)n == obs)
|
||||
G.out_full++;
|
||||
else if (n) /* > 0 */
|
||||
G.out_part++;
|
||||
@@ -312,7 +312,7 @@ int dd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
while (n) {
|
||||
size_t d = obs - oc;
|
||||
|
||||
if (d > n)
|
||||
if (d > (size_t)n)
|
||||
d = n;
|
||||
memcpy(obuf + oc, tmp, d);
|
||||
n -= d;
|
||||
|
Reference in New Issue
Block a user