Re: [PATCH 1/3] text-tailf: clean up gcc warnings & fix use of errno

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 03, 2007 at 02:15:03PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
> 
> Fix strict gcc warnings in tailf that come from using:
>   ("-Wall -Wp,-D_FORTIFY_SOURCE=2")
> 
> tailf.c:111: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result

 Applied with small changes. Thanks.

>  		fprintf(stderr, _("Cannot open \"%s\" for read\n"), filename);
> -		perror(argv[0]);
> +		fprintf(stderr, _("%s: fopen returned %d: %s\n"),
> +			argv[0], err, strerror(err));

 Please, don't use programmer-isms for error messages. It has to be
 readable for end-users. For example "Cannot open" is really better
 than "fopen returned".

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux