Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH 04/23] unit: Update unit tests to the new API
Date: Fri,  7 Jun 2024 17:47:04 -0500	[thread overview]
Message-ID: <20240607224746.903769-4-denkenz@gmail.com> (raw)
In-Reply-To: <20240607224746.903769-1-denkenz@gmail.com>

---
 unit/test-rilmodem-cb.c  | 9 +++++++--
 unit/test-rilmodem-cs.c  | 9 +++++++--
 unit/test-rilmodem-sms.c | 9 +++++++--
 3 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/unit/test-rilmodem-cb.c b/unit/test-rilmodem-cb.c
index 75e7e02076f6..984ea4efc64e 100644
--- a/unit/test-rilmodem-cb.c
+++ b/unit/test-rilmodem-cb.c
@@ -407,11 +407,16 @@ extern struct ofono_driver_desc __start___call_barring[];
 struct ofono_call_barring *ofono_call_barring_create(struct ofono_modem *modem,
 							unsigned int vendor,
 							const char *driver,
-							void *data)
+							...)
 {
-	struct rilmodem_cb_data *rsd = data;
+	struct rilmodem_cb_data *rsd;
 	struct ofono_call_barring *cb = g_new0(struct ofono_call_barring, 1);
 	int retval;
+	va_list args;
+
+	va_start(args, driver);
+	rsd = va_arg(args, void *);
+	va_end(args);
 
 	cbdriver = __start___call_barring[0].driver;
 
diff --git a/unit/test-rilmodem-cs.c b/unit/test-rilmodem-cs.c
index 414ded61022e..8c65fb1f6bb4 100644
--- a/unit/test-rilmodem-cs.c
+++ b/unit/test-rilmodem-cs.c
@@ -383,11 +383,16 @@ extern struct ofono_driver_desc __start___call_settings[];
 struct ofono_call_settings *ofono_call_settings_create(struct ofono_modem *modem,
 							unsigned int vendor,
 							const char *driver,
-							void *data)
+							...)
 {
-	struct rilmodem_cs_data *rcd = data;
+	struct rilmodem_cs_data *rcd;
 	struct ofono_call_settings *cs = g_new0(struct ofono_call_settings, 1);
 	int retval;
+	va_list args;
+
+	va_start(args, driver);
+	rcd = va_arg(args, void *);
+	va_end(args);
 
 	csdriver = __start___call_settings[0].driver;
 
diff --git a/unit/test-rilmodem-sms.c b/unit/test-rilmodem-sms.c
index 347922c309b6..8d85d23ce92a 100644
--- a/unit/test-rilmodem-sms.c
+++ b/unit/test-rilmodem-sms.c
@@ -414,11 +414,16 @@ extern struct ofono_driver_desc __start___sms[];
 struct ofono_sms *ofono_sms_create(struct ofono_modem *modem,
 					unsigned int vendor,
 					const char *driver,
-					void *data)
+					...)
 {
-	struct rilmodem_sms_data *rsd = data;
+	struct rilmodem_sms_data *rsd;
 	struct ofono_sms *sms = g_new0(struct ofono_sms, 1);
 	int retval;
+	va_list args;
+
+	va_start(args, driver);
+	rsd = va_arg(args, void *);
+	va_end(args);
 
 	smsdriver = __start___sms[0].driver;
 
-- 
2.45.0


  parent reply	other threads:[~2024-06-07 22:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07 22:47 [PATCH 01/23] gobi: Remove phonebook and stk atom creation Denis Kenzior
2024-06-07 22:47 ` [PATCH 02/23] qmi: lookup shared family directly by type Denis Kenzior
2024-06-07 22:47 ` [PATCH 03/23] core: allow multiple args in atom constructors Denis Kenzior
2024-06-07 22:47 ` Denis Kenzior [this message]
2024-06-07 22:47 ` [PATCH 05/23] core: Support register on probe flag Denis Kenzior
2024-06-07 22:47 ` [PATCH 06/23] qmi: introduce qmi_service_clone Denis Kenzior
2024-06-07 22:47 ` [PATCH 07/23] gobi: request needed services at .enable() Denis Kenzior
2024-06-07 22:47 ` [PATCH 08/23] qmi: devinfo: Drop use of qmi_service_create_shared Denis Kenzior
2024-06-07 22:47 ` [PATCH 09/23] qmi: sim-legacy: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 10/23] qmi: voicecall: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 11/23] qmi: call-barring: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 12/23] qmi: call-forwarding: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 13/23] qmi: call-settings: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 14/23] qmi: ussd: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 15/23] qmi: location-reporting: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 16/23] qmi: sms: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 17/23] qmi: netreg: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 18/23] qmi: netmon: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 19/23] qmi: lte: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 20/23] qmi: gprs-context: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 21/23] qmi: sim: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 22/23] qmi: gprs: " Denis Kenzior
2024-06-07 22:47 ` [PATCH 23/23] qmi: radio-settings: " Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240607224746.903769-4-denkenz@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox