diff --git a/device/camera/camera_output.c b/device/camera/camera_output.c index 5ef5f91..f579098 100644 --- a/device/camera/camera_output.c +++ b/device/camera/camera_output.c @@ -16,7 +16,7 @@ static bool camera_output_matches_capture(buffer_list_t *capture, unsigned target_height, unsigned format) { - if (target_height && abs(capture->fmt.height - target_height) > MATCH_ALIGN_SIZE) { + if (target_height && abs((int)capture->fmt.height - (int)target_height) > MATCH_ALIGN_SIZE) { return false; } diff --git a/device/device.c b/device/device.c index 7151ac8..36826f9 100644 --- a/device/device.c +++ b/device/device.c @@ -56,7 +56,7 @@ buffer_list_t *device_open_buffer_list2(device_t *dev, const char *path, bool do { char name[64]; int index = 0; - buffer_list_t *buf_list; + buffer_list_t *buf_list = NULL; if (!dev) { return NULL; diff --git a/device/libcamera/fake_camera.c b/device/libcamera/fake_camera.c index 9b1ef32..8026be7 100644 --- a/device/libcamera/fake_camera.c +++ b/device/libcamera/fake_camera.c @@ -26,7 +26,7 @@ void fake_camera_sensor(struct media_v2_topology *topology) } char source[256]; - sprintf(source, fake_camera); + strcpy(source, fake_camera); char *target = strstr(source, "="); if (!target) {