Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit 12f06e3

Browse files
committed
Fix warning for unused parameters with mingw-gcc
Compile with command make CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar or make CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
1 parent 4957909 commit 12f06e3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

init.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include <string.h>
2929
#include <unistd.h>
3030
#include <sys/stat.h>
31+
32+
#include "compiler.h"
3133
#include "init.h"
3234
#include "serial.h"
3335
#include "stm32.h"
@@ -156,7 +158,8 @@ static int release_gpio(int n, int input, int exported)
156158
return 1;
157159
}
158160
#else
159-
static int drive_gpio(int n, int level, struct gpio_list **gpio_to_release)
161+
static int drive_gpio(int __unused n, int __unused level,
162+
struct gpio_list __unused **gpio_to_release)
160163
{
161164
fprintf(stderr, "GPIO control only available in Linux\n");
162165
return 0;

serial_w32.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <windows.h>
2828
#include <ctype.h>
2929

30+
#include "compiler.h"
3031
#include "serial.h"
3132
#include "port.h"
3233

@@ -88,7 +89,7 @@ static serial_t *serial_open(const char *device)
8889
return h;
8990
}
9091

91-
static void serial_flush(const serial_t *h)
92+
static void serial_flush(const serial_t __unused *h)
9293
{
9394
/* We shouldn't need to flush in non-overlapping (blocking) mode */
9495
/* tcflush(h->fd, TCIFLUSH); */

0 commit comments

Comments
 (0)