Skip to content
Commit 3aa87254 authored by Viresh Kumar's avatar Viresh Kumar
Browse files

OPP: debugfs: Fix warning with W=1 builds



We currently get the following warning:

debugfs.c: In function ‘opp_debug_create_one’:
debugfs.c:63:42: warning: ‘%.1d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=]
   snprintf(name, sizeof(name), "icc-path-%.1d", i);
                                          ^~~~
debugfs.c:63:32: note: directive argument in the range [0, 2147483647]
   snprintf(name, sizeof(name), "icc-path-%.1d", i);
                                ^~~~~~~~~~~~~~~
debugfs.c:63:3: note: ‘snprintf’ output between 11 and 20 bytes into a destination of size 11
   snprintf(name, sizeof(name), "icc-path-%.1d", i);

Fix it by increasing size of the `name` array.

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent cca14de5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment