diff options
| author | Steve Dickson <steved@redhat.com> | 2018-02-20 08:28:31 -0500 |
|---|---|---|
| committer | Steve Dickson <steved@redhat.com> | 2018-02-23 09:17:48 -0500 |
| commit | 999f6bed8aa16246c500b3b41f7f638e1c7c1abe (patch) | |
| tree | 3822af647d91ea2c13e3c7e0a17af44d6c8f4e2b | |
| parent | dbb643ef3548f4a8016a635196eb36fd6d31afd7 (diff) | |
| download | nfs-utils-999f6bed8aa16246c500b3b41f7f638e1c7c1abe.tar.gz | |
Removed format-overflow=2 warnings
Added the -Werror=format-overflow=2 warning flag
and then cleaned up the mess
Signed-off-by: Steve Dickson <steved@redhat.com>
| -rw-r--r-- | configure.ac | 1 | ||||
| -rw-r--r-- | support/nfs/cacheio.c | 2 | ||||
| -rw-r--r-- | utils/idmapd/idmapd.c | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 31990c3..4f9d8c4 100644 --- a/configure.ac +++ b/configure.ac @@ -550,6 +550,7 @@ my_am_cflags="\ -Werror=strict-prototypes \ -Werror=missing-prototypes \ -Werror=missing-declarations \ + -Werror=format-overflow=2 \ " AC_SUBST([AM_CFLAGS], ["$my_am_cflags"]) diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c index 9912afa..9dc4cf1 100644 --- a/support/nfs/cacheio.c +++ b/support/nfs/cacheio.c @@ -212,7 +212,7 @@ cache_flush(int force) { struct stat stb; int c; - char stime[20]; + char stime[32]; char path[200]; time_t now; /* Note: the order of these caches is important. diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c index c7e75bd..67d115d 100644 --- a/utils/idmapd/idmapd.c +++ b/utils/idmapd/idmapd.c @@ -169,7 +169,7 @@ static int flush_nfsd_cache(char *path, time_t now) { int fd; - char stime[20]; + char stime[32]; sprintf(stime, "%ld\n", now); fd = open(path, O_RDWR); |
