mirror of
https://github.com/openwrt/packages.git
synced 2025-01-31 03:41:44 +00:00
7709b85f86
Patch taken from upstream. Signed-off-by: Rosen Penev <rosenp@gmail.com>
57 lines
3.3 KiB
Diff
57 lines
3.3 KiB
Diff
From 3467c3c354263b066ad47bddfe6eb869c0111e0d Mon Sep 17 00:00:00 2001
|
|
From: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
|
|
Date: Tue, 24 Jan 2023 10:19:16 +0100
|
|
Subject: [PATCH] Fix rs232_set_* prototypes mismatch
|
|
|
|
Fixes compilation error on gcc 13 (excerpt):
|
|
rs232_posix.c:490:1: error: conflicting types for 'rs232_set_baud' \
|
|
due to enum/integer mismatch; have 'unsigned int(struct rs232_port_t *, \
|
|
enum rs232_baud_e)' [-Werror=enum-int-mismatch]
|
|
490 | rs232_set_baud(struct rs232_port_t *p, enum rs232_baud_e baud)
|
|
| ^~~~~~~~~~~~~~
|
|
In file included from rs232_posix.c:39:
|
|
../include/librs232/rs232.h:203:24: note: previous declaration of \
|
|
'rs232_set_baud' with type 'unsigned int(struct rs232_port_t *, unsigned int)'
|
|
203 | RS232_LIB unsigned int rs232_set_baud(struct rs232_port_t *p, unsigned int baud);
|
|
| ^~~~~~~~~~~~~~
|
|
|
|
rs232_posix.c:591:1: error: conflicting types for 'rs232_set_dtr' \
|
|
due to enum/integer mismatch; have 'unsigned int(struct rs232_port_t *, \
|
|
enum rs232_dtr_e)' [-Werror=enum-int-mismatch]
|
|
591 | rs232_set_dtr(struct rs232_port_t *p, enum rs232_dtr_e state)
|
|
| ^~~~~~~~~~~~~
|
|
In file included from rs232_posix.c:39:
|
|
../include/librs232/rs232.h:208:24: note: previous declaration of 'rs232_set_dtr' \
|
|
with type 'unsigned int(struct rs232_port_t *, unsigned int)'
|
|
208 | RS232_LIB unsigned int rs232_set_dtr(struct rs232_port_t *p, unsigned int dtr);
|
|
| ^~~~~~~~~~~~~
|
|
|
|
Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
|
|
---
|
|
include/librs232/rs232.h | 14 +++++++-------
|
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
--- a/include/librs232/rs232.h
|
|
+++ b/include/librs232/rs232.h
|
|
@@ -200,13 +200,13 @@ RS232_LIB unsigned int rs232_port_open(s
|
|
RS232_LIB unsigned int rs232_close(struct rs232_port_t *p);
|
|
RS232_LIB unsigned int rs232_flush(struct rs232_port_t *p);
|
|
RS232_LIB void rs232_set_device(struct rs232_port_t *p, const char *device);
|
|
-RS232_LIB unsigned int rs232_set_baud(struct rs232_port_t *p, unsigned int baud);
|
|
-RS232_LIB unsigned int rs232_set_stop(struct rs232_port_t *p, unsigned int stop);
|
|
-RS232_LIB unsigned int rs232_set_data(struct rs232_port_t *p, unsigned int data);
|
|
-RS232_LIB unsigned int rs232_set_parity(struct rs232_port_t *p, unsigned int parity);
|
|
-RS232_LIB unsigned int rs232_set_flow(struct rs232_port_t *p, unsigned int flow);
|
|
-RS232_LIB unsigned int rs232_set_dtr(struct rs232_port_t *p, unsigned int dtr);
|
|
-RS232_LIB unsigned int rs232_set_rts(struct rs232_port_t *p, unsigned int rts);
|
|
+RS232_LIB unsigned int rs232_set_baud(struct rs232_port_t *p, enum rs232_baud_e baud);
|
|
+RS232_LIB unsigned int rs232_set_stop(struct rs232_port_t *p, enum rs232_stop_e stop);
|
|
+RS232_LIB unsigned int rs232_set_data(struct rs232_port_t *p, enum rs232_data_e data);
|
|
+RS232_LIB unsigned int rs232_set_parity(struct rs232_port_t *p, enum rs232_parity_e parity);
|
|
+RS232_LIB unsigned int rs232_set_flow(struct rs232_port_t *p, enum rs232_flow_e flow);
|
|
+RS232_LIB unsigned int rs232_set_dtr(struct rs232_port_t *p, enum rs232_dtr_e state);
|
|
+RS232_LIB unsigned int rs232_set_rts(struct rs232_port_t *p, enum rs232_rts_e state);
|
|
RS232_LIB const char * rs232_get_device(struct rs232_port_t *p);
|
|
RS232_LIB unsigned int rs232_get_baud(struct rs232_port_t *p);
|
|
RS232_LIB unsigned int rs232_get_stop(struct rs232_port_t *p);
|