diff options
| author | Lukas Slebodnik <lslebodn@redhat.com> | 2017-01-30 12:55:59 +0100 |
|---|---|---|
| committer | Lukas Slebodnik <lslebodn@redhat.com> | 2017-02-01 14:11:02 +0100 |
| commit | c587e9ae55c618c011bd4dde6a94fe5dc60fff01 (patch) | |
| tree | 0248ca12f7843a8e703d4f362bcff1d78728f18c /src/tools | |
| parent | cbb0e683ff11d7800328da3991f3e75ef88f937f (diff) | |
| download | sssd-c587e9ae55c618c011bd4dde6a94fe5dc60fff01.tar.gz sssd-c587e9ae55c618c011bd4dde6a94fe5dc60fff01.tar.xz sssd-c587e9ae55c618c011bd4dde6a94fe5dc60fff01.zip | |
TOOLS: Fix warning format-truncation
src/tools/sss_groupshow.c: In function ‘print_group_info’:
src/tools/sss_groupshow.c:612:22: error: ‘%d’ directive output truncated
writing between 10 and 11 bytes into a region of size 7 [-Werror=format-truncation=]
snprintf(fmt, 8, "%%%ds", level*PADDING_SPACES);
^~~~~~~
src/tools/sss_groupshow.c:612:22: note: using the range
[-2147483648, 2147483647] for directive argument
src/tools/sss_groupshow.c:612:5: note: ‘snprintf’ output between 13 and 14
bytes into a destination of size 8
snprintf(fmt, 8, "%%%ds", level*PADDING_SPACES);
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/sss_groupshow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/sss_groupshow.c b/src/tools/sss_groupshow.c index 258d458b0..ac4c3dc91 100644 --- a/src/tools/sss_groupshow.c +++ b/src/tools/sss_groupshow.c @@ -603,7 +603,7 @@ fail: /*==================The main program=================================== */ -static void print_group_info(struct group_info *g, int level) +static void print_group_info(struct group_info *g, unsigned level) { int i; char padding[512]; @@ -634,7 +634,7 @@ static void print_group_info(struct group_info *g, int level) printf(_("\n%1$sMember groups: "), padding); } -static void print_recursive(struct group_info **group_members, int level) +static void print_recursive(struct group_info **group_members, unsigned level) { int i; |
