[libcamera-devel,v3,5/6] test: v4l2_device: Remove unused function

Message ID 20190813094020.10277-6-kieran.bingham@ideasonboard.com
State Accepted
Headers show
Series
  • V4L2 M2M Support (+RPi PoC)
Related show

Commit Message

Kieran Bingham Aug. 13, 2019, 9:40 a.m. UTC
The 'exists()' call is not used within the code base.
Remove it.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 test/v4l2_videodevice/v4l2_videodevice_test.cpp | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Jacopo Mondi Aug. 13, 2019, 10:20 a.m. UTC | #1
Hi Kieran,
  nice catch

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
   j

On Tue, Aug 13, 2019 at 10:40:19AM +0100, Kieran Bingham wrote:
> The 'exists()' call is not used within the code base.
> Remove it.
>
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  test/v4l2_videodevice/v4l2_videodevice_test.cpp | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/test/v4l2_videodevice/v4l2_videodevice_test.cpp b/test/v4l2_videodevice/v4l2_videodevice_test.cpp
> index a0d269fef7f4..096f9649bfc9 100644
> --- a/test/v4l2_videodevice/v4l2_videodevice_test.cpp
> +++ b/test/v4l2_videodevice/v4l2_videodevice_test.cpp
> @@ -6,7 +6,6 @@
>   */
>
>  #include <iostream>
> -#include <sys/stat.h>
>
>  #include <linux/media-bus-format.h>
>
> @@ -18,16 +17,6 @@
>  using namespace std;
>  using namespace libcamera;
>
> -bool exists(const std::string &path)
> -{
> -	struct stat sb;
> -
> -	if (stat(path.c_str(), &sb) == 0)
> -		return true;
> -
> -	return false;
> -}
> -
>  int V4L2VideoDeviceTest::init()
>  {
>  	enumerator_ = DeviceEnumerator::create();
> --
> 2.20.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/test/v4l2_videodevice/v4l2_videodevice_test.cpp b/test/v4l2_videodevice/v4l2_videodevice_test.cpp
index a0d269fef7f4..096f9649bfc9 100644
--- a/test/v4l2_videodevice/v4l2_videodevice_test.cpp
+++ b/test/v4l2_videodevice/v4l2_videodevice_test.cpp
@@ -6,7 +6,6 @@ 
  */
 
 #include <iostream>
-#include <sys/stat.h>
 
 #include <linux/media-bus-format.h>
 
@@ -18,16 +17,6 @@ 
 using namespace std;
 using namespace libcamera;
 
-bool exists(const std::string &path)
-{
-	struct stat sb;
-
-	if (stat(path.c_str(), &sb) == 0)
-		return true;
-
-	return false;
-}
-
 int V4L2VideoDeviceTest::init()
 {
 	enumerator_ = DeviceEnumerator::create();