mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 14:35:27 +00:00
patch #8896: Silence cppcheck warnings in 6.2 code
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1372 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2016-02-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
patch #8896: Silence cppcheck warnings in 6.2 code
|
||||
* linuxgpio.c: Use %ud to print GPIO values.
|
||||
|
||||
2016-02-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
patch #8735: ATtiny28 support in avrdude.conf
|
||||
|
1
NEWS
1
NEWS
@@ -27,6 +27,7 @@ Current:
|
||||
|
||||
- patch #8435: Implementing mEDBG CMSIS-DAP protocol
|
||||
- patch #8735: ATtiny28 support in avrdude.conf
|
||||
- patch #8896: Silence cppcheck warnings in 6.2 code
|
||||
|
||||
* Internals:
|
||||
|
||||
|
@@ -66,7 +66,7 @@ static int linuxgpio_export(unsigned int gpio)
|
||||
return fd;
|
||||
}
|
||||
|
||||
len = snprintf(buf, sizeof(buf), "%d", gpio);
|
||||
len = snprintf(buf, sizeof(buf), "%ud", gpio);
|
||||
r = write(fd, buf, len);
|
||||
close(fd);
|
||||
|
||||
@@ -84,7 +84,7 @@ static int linuxgpio_unexport(unsigned int gpio)
|
||||
return fd;
|
||||
}
|
||||
|
||||
len = snprintf(buf, sizeof(buf), "%d", gpio);
|
||||
len = snprintf(buf, sizeof(buf), "%ud", gpio);
|
||||
r = write(fd, buf, len);
|
||||
close(fd);
|
||||
|
||||
@@ -95,7 +95,7 @@ static int linuxgpio_openfd(unsigned int gpio)
|
||||
{
|
||||
char filepath[60];
|
||||
|
||||
snprintf(filepath, sizeof(filepath), "/sys/class/gpio/gpio%d/value", gpio);
|
||||
snprintf(filepath, sizeof(filepath), "/sys/class/gpio/gpio%ud/value", gpio);
|
||||
return (open(filepath, O_RDWR));
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ static int linuxgpio_dir(unsigned int gpio, unsigned int dir)
|
||||
int fd, r;
|
||||
char buf[60];
|
||||
|
||||
snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%d/direction", gpio);
|
||||
snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%ud/direction", gpio);
|
||||
|
||||
fd = open(buf, O_WRONLY);
|
||||
if (fd < 0) {
|
||||
|
Reference in New Issue
Block a user