diff --git a/src/ipa/raspberrypi/controller/histogram.cpp b/src/ipa/raspberrypi/controller/histogram.cpp
index 9916b3ed..ac3f5c48 100644
--- a/src/ipa/raspberrypi/controller/histogram.cpp
+++ b/src/ipa/raspberrypi/controller/histogram.cpp
@@ -51,7 +51,7 @@ double Histogram::InterQuantileMean(double q_lo, double q_hi) const
 	double p_lo = Quantile(q_lo);
 	double p_hi = Quantile(q_hi, (int)p_lo);
 	double sum_bin_freq = 0, cumul_freq = 0;
-	for (double p_next = floor(p_lo) + 1.0; p_next <= ceil(p_hi);
+	for (double p_next = floor(p_lo) + 1.0; p_next <= ceil(p_hi); // NOLINT: Variable 'p_next' with floating point type 'double' should not be used as a loop counter [clang-analyzer-security.FloatLoopCounter]
 	     p_lo = p_next, p_next += 1.0) {
 		int bin = floor(p_lo);
 		double freq = (cumulative_[bin + 1] - cumulative_[bin]) *
diff --git a/src/libcamera/object.cpp b/src/libcamera/object.cpp
index cd83c684..1b1775e6 100644
--- a/src/libcamera/object.cpp
+++ b/src/libcamera/object.cpp
@@ -257,7 +257,8 @@ void Object::moveToThread(Thread *thread)
 
 	notifyThreadMove();
 
-	thread->moveObject(this);
+	// clang-tidy thinks that the thread can be deleted via DeferredDelete handling in notifyThreadMove()
+	thread->moveObject(this); // NOLINT: warning: Use of memory after it is freed [clang-analyzer-cplusplus.NewDelete]
 }
 
 void Object::notifyThreadMove()
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index af47739d..eac27153 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -508,6 +508,7 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
 	 * be at least one active stream in the configuration request).
 	 */
 	if (!vfCfg) {
+		assert(mainCfg);
 		ret = imgu->configureViewfinder(*mainCfg, &outputFormat);
 		if (ret)
 			return ret;
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index aa8d9340..4544d606 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -1290,6 +1290,7 @@ void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)
 
 	/* The buffer must belong to one of our streams. */
 	ASSERT(stream);
+	assert(stream);
 
 	LOG(RPI, Debug) << "Stream " << stream->name() << " buffer dequeue"
 			<< ", buffer id " << index
@@ -1358,6 +1359,7 @@ void RPiCameraData::ispOutputDequeue(FrameBuffer *buffer)
 
 	/* The buffer must belong to one of our ISP output streams. */
 	ASSERT(stream);
+	assert(stream);
 
 	LOG(RPI, Debug) << "Stream " << stream->name() << " buffer complete"
 			<< ", buffer id " << index
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index c74a2e9b..be55c32f 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -379,6 +379,8 @@ protected:
 		if (!info)
 			LOG(RkISP1, Fatal) << "Frame not known";
 
+		assert(info);
+
 		/*
 		 * \todo: If parameters are not filled a better method to handle
 		 * the situation than queuing a buffer with unknown content
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index 31d4dad0..f747ba79 100644
--- a/src/libcamera/v4l2_device.cpp
+++ b/src/libcamera/v4l2_device.cpp
@@ -243,7 +243,6 @@ ControlList V4L2Device::getControls(const std::vector<uint32_t> &ids)
 		LOG(V4L2, Error) << "Unable to read control " << errorIdx
 				 << ": " << strerror(-ret);
 		count = errorIdx - 1;
-		ret = errorIdx;
 	}
 
 	updateControls(&ctrls, v4l2Ctrls, count);
diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
index 03ab085c..354136b7 100644
--- a/src/libcamera/v4l2_pixelformat.cpp
+++ b/src/libcamera/v4l2_pixelformat.cpp
@@ -163,7 +163,7 @@ std::string V4L2PixelFormat::toString() const
 	}
 
 	if (fourcc_ & (1 << 31))
-		strcat(ss, "-BE");
+		memcpy(ss + 4, "-BE", 3);
 
 	return ss;
 }
