meson: Remove -Wno-unused-parameter
We build libcamera with -Wno-unused-parameter and this doesn't cause much issue internally. However, it prevents catching unused parameters in inline functions defined in public headers. This can lead to compilation warnings for applications compiled without -Wno-unused-parameter. To catch those issues, remove -Wno-unused-parameter and fix all the related warnings with [[maybe_unused]]. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -33,7 +33,8 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
void bufferComplete(Request *request, FrameBuffer *buffer)
|
||||
void bufferComplete([[maybe_unused]] Request *request,
|
||||
FrameBuffer *buffer)
|
||||
{
|
||||
if (buffer->metadata().status != FrameMetadata::FrameSuccess)
|
||||
return;
|
||||
|
||||
@@ -26,7 +26,8 @@ protected:
|
||||
unsigned int completeBuffersCount_;
|
||||
unsigned int completeRequestsCount_;
|
||||
|
||||
void bufferComplete(Request *request, FrameBuffer *buffer)
|
||||
void bufferComplete([[maybe_unused]] Request *request,
|
||||
FrameBuffer *buffer)
|
||||
{
|
||||
if (buffer->metadata().status != FrameMetadata::FrameSuccess)
|
||||
return;
|
||||
|
||||
@@ -26,12 +26,12 @@ using namespace libcamera;
|
||||
class HotplugTest : public Test
|
||||
{
|
||||
protected:
|
||||
void cameraAddedHandler(std::shared_ptr<Camera> cam)
|
||||
void cameraAddedHandler([[maybe_unused]] std::shared_ptr<Camera> cam)
|
||||
{
|
||||
cameraAdded_ = true;
|
||||
}
|
||||
|
||||
void cameraRemovedHandler(std::shared_ptr<Camera> cam)
|
||||
void cameraRemovedHandler([[maybe_unused]] std::shared_ptr<Camera> cam)
|
||||
{
|
||||
cameraRemoved_ = true;
|
||||
}
|
||||
|
||||
@@ -70,8 +70,8 @@ public:
|
||||
void configure(const CameraSensorInfo &sensorInfo,
|
||||
const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls,
|
||||
const IPAOperationData &ipaConfig,
|
||||
IPAOperationData *result) override
|
||||
[[maybe_unused]] const IPAOperationData &ipaConfig,
|
||||
[[maybe_unused]] IPAOperationData *result) override
|
||||
{
|
||||
/* Verify sensorInfo. */
|
||||
if (sensorInfo.outputSize.width != 2560 ||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ protected:
|
||||
};
|
||||
|
||||
#define TEST_REGISTER(klass) \
|
||||
int main(int argc, char *argv[]) \
|
||||
int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[]) \
|
||||
{ \
|
||||
return klass().execute(); \
|
||||
}
|
||||
|
||||
@@ -125,7 +125,8 @@ protected:
|
||||
}
|
||||
|
||||
private:
|
||||
void procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)
|
||||
void procFinished([[maybe_unused]] Process *proc,
|
||||
enum Process::ExitStatus exitStatus, int exitCode)
|
||||
{
|
||||
exitStatus_ = exitStatus;
|
||||
exitCode_ = exitCode;
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
value_ = value;
|
||||
}
|
||||
|
||||
void methodWithReference(const int &value)
|
||||
void methodWithReference([[maybe_unused]] const int &value)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,8 @@ protected:
|
||||
}
|
||||
|
||||
private:
|
||||
void procFinished(Process *proc, enum Process::ExitStatus exitStatus, int exitCode)
|
||||
void procFinished([[maybe_unused]] Process *proc,
|
||||
enum Process::ExitStatus exitStatus, int exitCode)
|
||||
{
|
||||
exitStatus_ = exitStatus;
|
||||
exitCode_ = exitCode;
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void timeoutHandler(Timer *timer)
|
||||
void timeoutHandler([[maybe_unused]] Timer *timer)
|
||||
{
|
||||
timeout_ = true;
|
||||
}
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void timeoutHandler(Timer *timer)
|
||||
void timeoutHandler([[maybe_unused]] Timer *timer)
|
||||
{
|
||||
expiration_ = std::chrono::steady_clock::now();
|
||||
count_++;
|
||||
|
||||
Reference in New Issue
Block a user