digitemp: fix build failure with gcc-15.0.1

* backport fix from:
  fa56b0f78d
  to fix:
   src/digitemp.c:171:6: error: conflicting types for ‘free_coupler’; have ‘void(int)’
   171 | void free_coupler( int free_only )
         |      ^~~~~~~~~~~~
   In file included from src/digitemp.c:78:
   src/digitemp.h:90:6: note: previous declaration of ‘free_coupler’ with type ‘void(void)’
      90 | void free_coupler();
         |      ^~~~~~~~~~~~

Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
mark.yang 2025-04-07 19:47:43 +09:00 committed by Khem Raj
parent 8ef6332dcf
commit 7787e41e80
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From fa56b0f78d12f97ac44e0a367d413a9e88611d1c Mon Sep 17 00:00:00 2001
From: Robert Scheck <robert-scheck@users.noreply.github.com>
Date: Thu, 16 Jan 2025 21:24:41 +0100
Subject: [PATCH] Fix conflicting prototype
src/digitemp.c:171:6: error: conflicting types for free_coupler; have void(int)
171 | void free_coupler( int free_only )
| ^~~~~~~~~~~~
In file included from src/digitemp.c:78:
src/digitemp.h:90:6: note: previous declaration of free_coupler with type void(void)
90 | void free_coupler();
| ^~~~~~~~~~~~
Upstream-Status: Backport [https://github.com/bcl/digitemp/commit/fa56b0f78d12f97ac44e0a367d413a9e88611d1c]
Signed-off-by: mark.yang <mark.yang@lge.com>
---
src/digitemp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/digitemp.h b/src/digitemp.h
index 06d50e9..e81a7be 100644
--- a/src/digitemp.h
+++ b/src/digitemp.h
@@ -87,7 +87,7 @@ struct _coupler {
/* Prototypes */
void usage();
-void free_coupler();
+void free_coupler( int free_only );
float c2f( float temp );
int build_tf( char *time_format, char *format, int sensor,
float temp_c, int humidity, unsigned char *sn );

View File

@ -4,7 +4,10 @@ DEPENDS = "libusb1"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=44fee82a1d2ed0676cf35478283e0aa0"
SRC_URI = "git://github.com/bcl/digitemp;branch=master;protocol=https"
SRC_URI = " \
git://github.com/bcl/digitemp;branch=master;protocol=https \
file://0001-Fix-conflicting-prototype.patch \
"
SRCREV = "a162e63aad35358aab325388f3d5e88121606419"