mirror of
https://github.com/openwrt/packages.git
synced 2026-12-04 22:05:48 +04:00
basicstation: make the TLS constructor prototype explicit
The caller invokes tls_makeConf without arguments and the definition ignores its three parameters. GCC 15 uses C23 by default and detects that the declaration conflicts with the definition. Use void in both, preserving the existing behavior. Assisted-by: LLM Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
1 parent
76e63f338e
commit
c8698f5792
2 files changed
+31
-1
No files matched your search
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=basicstation
|
||||
PKG_VERSION:=2.0.6
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/lorabasics/basicstation/tar.gz/v$(PKG_VERSION)?
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sat, 28 Nov 2026 03:07:46 +0100
|
||||
Subject: [PATCH] Use a void parameter list for tls_makeConf
|
||||
|
||||
The only caller passes no arguments and the definition ignores all
|
||||
three declared parameters. Give both a matching C23 prototype.
|
||||
|
||||
--- a/src/tls.h
|
||||
+++ b/src/tls.h
|
||||
@@ -42,7 +42,7 @@ typedef struct mbedtls_ssl_context* tlsc
|
||||
extern u1_t tls_dbgLevel;
|
||||
void log_mbedError (u1_t mod_level, int ret, const char* fmt, ...);
|
||||
|
||||
-tlsconf_t* tls_makeConf ();
|
||||
+tlsconf_t* tls_makeConf (void);
|
||||
void tls_freeConf (tlsconf_t* conf);
|
||||
int tls_setMyCert (tlsconf_t* conf, const char* cert, int certlen, const char* key, int keylen, const char* pwd);
|
||||
int tls_setTrustedCAs (tlsconf_t* conf, const char* file_or_data, int len);
|
||||
--- a/src/tls.c
|
||||
+++ b/src/tls.c
|
||||
@@ -107,7 +107,7 @@ void log_mbedError (u1_t mod_level, int
|
||||
}
|
||||
|
||||
|
||||
-tlsconf_t* tls_makeConf (mbedtls_x509_crt* trust, mbedtls_x509_crt* mycert, mbedtls_pk_context* mykey) {
|
||||
+tlsconf_t* tls_makeConf (void) {
|
||||
tlsconf_t* conf = rt_malloc(tlsconf_t);
|
||||
mbedtls_ssl_config_init(&conf->sslconfig);
|
||||
conf->trust = NULL;
|
||||
Reference in new issue
Block a user