Without that fix we have the following warning: CC modems/xmm626/xmm626_kernel_smdk4412.lo ../../../samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c: In function 'xmm626_kernel_smdk4412_gprs_get_iface': ../../../samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c:589:9: warning: ignoring return value of 'asprintf' declared with attribute 'warn_unused_result' [-Wunused-result] 589 | asprintf(&iface, "%s%d", XMM626_[...]_IFACE_PREFIX, cid - 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC modems/xmm626/xmm626_mipi.lo
Signed-off-by: Denis 'GNUtoo' Carikli <gnu...@cyberdimension.org> --- samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c b/samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c index c6b1578..a8de89c 100644 --- a/samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c +++ b/samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c @@ -582,11 +582,17 @@ char *xmm626_kernel_smdk4412_gprs_get_iface( __attribute__((unused)) struct ipc_client *client, unsigned int cid) { char *iface = NULL; + int rc; if (cid > XMM626_SEC_MODEM_GPRS_IFACE_COUNT) return NULL; - asprintf(&iface, "%s%d", XMM626_SEC_MODEM_GPRS_IFACE_PREFIX, cid - 1); + rc = asprintf(&iface, "%s%d", + XMM626_SEC_MODEM_GPRS_IFACE_PREFIX, cid - 1); + if (rc == -1) { + ipc_client_log(client, "%s: asprintf failed", __func__); + return NULL; + } return iface; } -- 2.36.1 _______________________________________________ Replicant mailing list Replicant@osuosl.org https://lists.osuosl.org/mailman/listinfo/replicant