From 94eafb31caa5d37207043a45eff04011540eca3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20B=C3=A9rub=C3=A9?= Date: Mon, 19 Aug 2024 07:51:05 -0400 Subject: [PATCH] Missing return codes on some calls in snapshot_grab --- src/hal/hisi/v1_hal.c | 4 ++-- src/hal/hisi/v2_hal.c | 4 ++-- src/hal/hisi/v3_hal.c | 4 ++-- src/hal/hisi/v4_hal.c | 4 ++-- src/hal/inge/t31_hal.c | 4 ++-- src/hal/star/i6_hal.c | 4 ++-- src/hal/star/i6c_hal.c | 4 ++-- src/hal/star/i6f_hal.c | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/hal/hisi/v1_hal.c b/src/hal/hisi/v1_hal.c index cb9149e..238317a 100644 --- a/src/hal/hisi/v1_hal.c +++ b/src/hal/hisi/v1_hal.c @@ -601,7 +601,7 @@ int v1_video_snapshot_grab(char index, hal_jpegdata *jpeg) } unsigned int count = 1; - if (v1_venc.fnStartReceivingEx(index, &count)) { + if (ret = v1_venc.fnStartReceivingEx(index, &count)) { HAL_DANGER("v1_venc", "Requesting one frame " "%d failed with %#x!\n", index, ret); goto abort; @@ -624,7 +624,7 @@ int v1_video_snapshot_grab(char index, hal_jpegdata *jpeg) if (FD_ISSET(fd, &readFds)) { v1_venc_stat stat; - if (v1_venc.fnQuery(index, &stat)) { + if (ret = v1_venc.fnQuery(index, &stat)) { HAL_DANGER("v1_venc", "Querying the encoder channel " "%d failed with %#x!\n", index, ret); goto abort; diff --git a/src/hal/hisi/v2_hal.c b/src/hal/hisi/v2_hal.c index f637ae6..3c403f9 100644 --- a/src/hal/hisi/v2_hal.c +++ b/src/hal/hisi/v2_hal.c @@ -643,7 +643,7 @@ int v2_video_snapshot_grab(char index, hal_jpegdata *jpeg) } unsigned int count = 1; - if (v2_venc.fnStartReceivingEx(index, &count)) { + if (ret = v2_venc.fnStartReceivingEx(index, &count)) { HAL_DANGER("v2_venc", "Requesting one frame " "%d failed with %#x!\n", index, ret); goto abort; @@ -666,7 +666,7 @@ int v2_video_snapshot_grab(char index, hal_jpegdata *jpeg) if (FD_ISSET(fd, &readFds)) { v2_venc_stat stat; - if (v2_venc.fnQuery(index, &stat)) { + if (ret = v2_venc.fnQuery(index, &stat)) { HAL_DANGER("v2_venc", "Querying the encoder channel " "%d failed with %#x!\n", index, ret); goto abort; diff --git a/src/hal/hisi/v3_hal.c b/src/hal/hisi/v3_hal.c index d584061..6362eff 100644 --- a/src/hal/hisi/v3_hal.c +++ b/src/hal/hisi/v3_hal.c @@ -662,7 +662,7 @@ int v3_video_snapshot_grab(char index, hal_jpegdata *jpeg) } unsigned int count = 1; - if (v3_venc.fnStartReceivingEx(index, &count)) { + if (ret = v3_venc.fnStartReceivingEx(index, &count)) { HAL_DANGER("v3_venc", "Requesting one frame " "%d failed with %#x!\n", index, ret); goto abort; @@ -685,7 +685,7 @@ int v3_video_snapshot_grab(char index, hal_jpegdata *jpeg) if (FD_ISSET(fd, &readFds)) { v3_venc_stat stat; - if (v3_venc.fnQuery(index, &stat)) { + if (ret = v3_venc.fnQuery(index, &stat)) { HAL_DANGER("v3_venc", "Querying the encoder channel " "%d failed with %#x!\n", index, ret); goto abort; diff --git a/src/hal/hisi/v4_hal.c b/src/hal/hisi/v4_hal.c index 1a8d315..f835d4e 100644 --- a/src/hal/hisi/v4_hal.c +++ b/src/hal/hisi/v4_hal.c @@ -708,7 +708,7 @@ int v4_video_snapshot_grab(char index, hal_jpegdata *jpeg) } unsigned int count = 1; - if (v4_venc.fnStartReceivingEx(index, &count)) { + if (ret = v4_venc.fnStartReceivingEx(index, &count)) { HAL_DANGER("v4_venc", "Requesting one frame " "%d failed with %#x!\n", index, ret); goto abort; @@ -731,7 +731,7 @@ int v4_video_snapshot_grab(char index, hal_jpegdata *jpeg) if (FD_ISSET(fd, &readFds)) { v4_venc_stat stat; - if (v4_venc.fnQuery(index, &stat)) { + if (ret = v4_venc.fnQuery(index, &stat)) { HAL_DANGER("v4_venc", "Querying the encoder channel " "%d failed with %#x!\n", index, ret); goto abort; diff --git a/src/hal/inge/t31_hal.c b/src/hal/inge/t31_hal.c index 37fcc1f..34592b3 100644 --- a/src/hal/inge/t31_hal.c +++ b/src/hal/inge/t31_hal.c @@ -485,7 +485,7 @@ int t31_video_snapshot_grab(char index, hal_jpegdata *jpeg) goto abort; } - if (t31_venc.fnStartReceiving(index)) { + if (ret = t31_venc.fnStartReceiving(index)) { HAL_DANGER("t31_venc", "Requesting one frame " "%d failed with %#x!\n", index, ret); goto abort; @@ -509,7 +509,7 @@ int t31_video_snapshot_grab(char index, hal_jpegdata *jpeg) if (FD_ISSET(fd, &readFds)) { t31_venc_stat stat; - if (t31_venc.fnQuery(index, &stat)) { + if (ret = t31_venc.fnQuery(index, &stat)) { HAL_DANGER("t31_venc", "Querying the encoder channel " "%d failed with %#x!\n", index, ret); goto abort; diff --git a/src/hal/star/i6_hal.c b/src/hal/star/i6_hal.c index 5468443..86d7bb4 100644 --- a/src/hal/star/i6_hal.c +++ b/src/hal/star/i6_hal.c @@ -672,7 +672,7 @@ int i6_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg) } unsigned int count = 1; - if (i6_venc.fnStartReceivingEx(index, &count)) { + if (ret = i6_venc.fnStartReceivingEx(index, &count)) { HAL_DANGER("i6_venc", "Requesting one frame " "%d failed with %#x!\n", index, ret); goto abort; @@ -695,7 +695,7 @@ int i6_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg) if (FD_ISSET(fd, &readFds)) { i6_venc_stat stat; - if (i6_venc.fnQuery(index, &stat)) { + if (ret = i6_venc.fnQuery(index, &stat)) { HAL_DANGER("i6_venc", "Querying the encoder channel " "%d failed with %#x!\n", index, ret); goto abort; diff --git a/src/hal/star/i6c_hal.c b/src/hal/star/i6c_hal.c index f78dbfc..780a9f0 100644 --- a/src/hal/star/i6c_hal.c +++ b/src/hal/star/i6c_hal.c @@ -760,7 +760,7 @@ int i6c_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg) } unsigned int count = 1; - if (i6c_venc.fnStartReceivingEx(_i6c_venc_dev[index], index, &count)) { + if (ret = i6c_venc.fnStartReceivingEx(_i6c_venc_dev[index], index, &count)) { HAL_DANGER("i6c_venc", "Requesting one frame " "%d failed with %#x!\n", index, ret); goto abort; @@ -783,7 +783,7 @@ int i6c_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg) if (FD_ISSET(fd, &readFds)) { i6c_venc_stat stat; - if (i6c_venc.fnQuery(_i6c_venc_dev[index], index, &stat)) { + if (ret = i6c_venc.fnQuery(_i6c_venc_dev[index], index, &stat)) { HAL_DANGER("i6c_venc", "Querying the encoder channel " "%d failed with %#x!\n", index, ret); goto abort; diff --git a/src/hal/star/i6f_hal.c b/src/hal/star/i6f_hal.c index 3561d1b..03da63f 100644 --- a/src/hal/star/i6f_hal.c +++ b/src/hal/star/i6f_hal.c @@ -716,7 +716,7 @@ int i6f_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg) } unsigned int count = 1; - if (i6f_venc.fnStartReceivingEx(_i6f_venc_dev[index], index, &count)) { + if (ret = i6f_venc.fnStartReceivingEx(_i6f_venc_dev[index], index, &count)) { HAL_DANGER("i6f_venc", "Requesting one frame " "%d failed with %#x!\n", index, ret); goto abort; @@ -739,7 +739,7 @@ int i6f_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg) if (FD_ISSET(fd, &readFds)) { i6f_venc_stat stat; - if (i6f_venc.fnQuery(_i6f_venc_dev[index], index, &stat)) { + if (ret = i6f_venc.fnQuery(_i6f_venc_dev[index], index, &stat)) { HAL_DANGER("i6f_venc", "Querying the encoder channel " "%d failed with %#x!\n", index, ret); goto abort;