summaryrefslogtreecommitdiffstats
path: root/external/opal-prd/i2c.c
diff options
context:
space:
mode:
authorFrédéric Bonnard <frediz@linux.vnet.ibm.com>2018-01-31 13:48:55 +0100
committerStewart Smith <stewart@linux.vnet.ibm.com>2018-02-08 18:21:43 -0600
commitb3e14c46ecb069b3076ca052e7180048dd863e5c (patch)
tree838376987c36861cf78f1c0fbaa0e52626771866 /external/opal-prd/i2c.c
parent729520fd9aa982a21863c3ee0529f8a74e096a4d (diff)
downloadtalos-skiboot-b3e14c46ecb069b3076ca052e7180048dd863e5c.tar.gz
talos-skiboot-b3e14c46ecb069b3076ca052e7180048dd863e5c.zip
Fix FTBFS with -Werror=format-overflow
i2c.c fails to compile with gcc7 and -Werror=format-overflow used in Debian Unstable and Ubuntu 18.04 : i2c.c: In function ‘i2c_init’: i2c.c:211:15: error: ‘%s’ directive writing up to 255 bytes into a region of size 236 [-Werror=format-overflow=] dpath is supposed to store an entire path. Reported-by: Michel Normand <michel.mno@free.fr> Signed-off-by: Frédéric Bonnard <frediz@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/opal-prd/i2c.c')
-rw-r--r--external/opal-prd/i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/external/opal-prd/i2c.c b/external/opal-prd/i2c.c
index ba4b3c85..0c9947c1 100644
--- a/external/opal-prd/i2c.c
+++ b/external/opal-prd/i2c.c
@@ -211,7 +211,7 @@ void i2c_init(void)
#define SYSFS "/sys" /* XXX Find it ? */
DIR *devsdir;
struct dirent *devent;
- char dpath[NAME_MAX];
+ char dpath[PATH_MAX];
char busname[256];
char *s;
FILE *f;
OpenPOWER on IntegriCloud