Recent gcc complains if the return value of strtoul() is not used: chcp.c: In function ¡Æain¡Ç chcp.c:122: warning: ignoring return value of ¡Ætrtoul¡Ç declared with attribute warn_unused_result dumpseg.c: In function ¡Æain¡Ç dumpseg.c:214: warning: ignoring return value of ¡Ætrtoul¡Ç declared with attribute warn_unused_result This kills these warnings. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx> --- bin/chcp.c | 3 ++- bin/dumpseg.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/chcp.c b/bin/chcp.c index deb9a2b..a66e437 100644 --- a/bin/chcp.c +++ b/bin/chcp.c @@ -78,6 +78,7 @@ int main(int argc, char *argv[]) nilfs_cno_t cno; char *dev, *modestr, *progname, *endptr; int c, mode, status; + unsigned long val; #ifdef _GNU_SOURCE int option_index; #endif /* _GNU_SOURCE */ @@ -119,7 +120,7 @@ int main(int argc, char *argv[]) dev = NULL; } else { modestr = argv[optind++]; - strtoul(argv[optind], &endptr, CHCP_BASE); + val = strtoul(argv[optind], &endptr, CHCP_BASE); if (*endptr == '\0') dev = NULL; else diff --git a/bin/dumpseg.c b/bin/dumpseg.c index fbc587d..0ee6aee 100644 --- a/bin/dumpseg.c +++ b/bin/dumpseg.c @@ -174,6 +174,7 @@ int main(int argc, char *argv[]) void *seg; ssize_t segsize; int c, i, status; + unsigned long val; #ifdef _GNU_SOURCE int option_index; #endif /* _GNU_SOURCE */ @@ -211,7 +212,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "%s: too few arguments\n", progname); exit(1); } else { - strtoul(argv[optind], &endptr, DUMPSEG_BASE); + val = strtoul(argv[optind], &endptr, DUMPSEG_BASE); if (*endptr == '\0') dev = NULL; else -- 1.6.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html