]> Git Repo - linux.git/commit
SUNRPC: Fix -Wformat-truncation warning
authorKunwu Chan <[email protected]>
Fri, 16 Aug 2024 02:07:40 +0000 (10:07 +0800)
committerAnna Schumaker <[email protected]>
Mon, 23 Sep 2024 19:03:13 +0000 (15:03 -0400)
commit9090a7f78623b5312562861d54a4476d905c7c4c
treed8a0f951c118f4efcc91f1122d200d30e49e74c6
parente343678ee990912a132e94236fe028efe78696b0
SUNRPC: Fix -Wformat-truncation warning

Increase size of the servername array to avoid truncated output warning.

net/sunrpc/clnt.c:582:75: error:‘%s’ directive output may be truncated
writing up to 107 bytes into a region of size 48
[-Werror=format-truncation=]
  582 |                   snprintf(servername, sizeof(servername), "%s",
      |                                                             ^~

net/sunrpc/clnt.c:582:33: note:‘snprintf’ output
between 1 and 108 bytes into a destination of size 48
  582 |                     snprintf(servername, sizeof(servername), "%s",
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  583 |                                          sun->sun_path);

Signed-off-by: Kunwu Chan <[email protected]>
Suggested-by: NeilBrown <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
net/sunrpc/clnt.c
This page took 0.068955 seconds and 4 git commands to generate.