[sheepdog] [PATCH 1/2] collie: confirm when rolling back to the snapshot
Liu Yuan
namei.unix at gmail.com
Tue Apr 9 11:23:47 CEST 2013
On 04/09/2013 12:46 AM, MORITA Kazutaka wrote:
> +void confirm(const char *message)
> +{
> + char input[8] = "";
> +
> + printf("%s", message);
> + fgets(input, sizeof(input), stdin);
> + if (strncasecmp(input, "yes", 3) != 0)
> + exit(EXIT_SUCCESS);
> +}
Get a warning.
common.c:283:7: warning: ignoring return value of ‘fgets’, declared with
attribute warn_unused_result [-Wunused-result]
Thanks,
Yuan
More information about the sheepdog
mailing list