[v2,2/2] libcamera: add missing <stdint.h> include to internal/yaml_parser.h
diff mbox series

Message ID 20240804205544.2500138-2-slyich@gmail.com
State New
Headers show
Series
  • [v2,1/2] libcamera: add missing <stdint.h> include to base/file.h
Related show

Commit Message

Sergei Trofimovich Aug. 4, 2024, 8:55 p.m. UTC
Without the change the build fails on upcoming `gcc-15` as:

    In file included from ../src/libcamera/yaml_parser.cpp:8:
    ../include/libcamera/internal/yaml_parser.h:183:41: error: 'uint8_t' was not declared in this scope
      183 |                          std::is_same_v<uint8_t, T> ||
          |                                         ^~~~~~~

Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
---
 include/libcamera/internal/yaml_parser.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Laurent Pinchart Aug. 9, 2024, 10:04 p.m. UTC | #1
Hi Sergei,

Thank you for the patch.

On Sun, Aug 04, 2024 at 09:55:44PM +0100, Sergei Trofimovich wrote:
> Without the change the build fails on upcoming `gcc-15` as:
> 
>     In file included from ../src/libcamera/yaml_parser.cpp:8:
>     ../include/libcamera/internal/yaml_parser.h:183:41: error: 'uint8_t' was not declared in this scope
>       183 |                          std::is_same_v<uint8_t, T> ||
>           |                                         ^~~~~~~
> 
> Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
> ---
>  include/libcamera/internal/yaml_parser.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h
> index e38a2df9..f8e4f841 100644
> --- a/include/libcamera/internal/yaml_parser.h
> +++ b/include/libcamera/internal/yaml_parser.h
> @@ -7,6 +7,8 @@
>  
>  #pragma once
>  
> +#include <stdint.h>
> +
>  #include <iterator>
>  #include <map>
>  #include <optional>

checkstyle.py should have told you that the stdint.h header is not added
to the right location. I recommend running checkstyle.py automatically
with the post-commit git hook:

cp utils/hooks/post-commit .git/hooks/

With this, committing the patch will output the following:

------------------------------------------------------------------------------------------------------------
e76753cfe464565d13dc5bda41b69bbec0a2cbb6 libcamera: add missing <stdint.h> include to internal/yaml_parser.h
------------------------------------------------------------------------------------------------------------
--- include/libcamera/internal/yaml_parser.h
+++ include/libcamera/internal/yaml_parser.h
@@ -7,11 +7,10 @@

 #pragma once

-#include <stdint.h>
-
 #include <iterator>
 #include <map>
 #include <optional>
+#include <stdint.h>
 #include <string>
 #include <vector>

---
1 potential issue detected, please review

Successfully rebased and updated refs/heads/master.




I will fix this when applying the patch, no need for a v3.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Dan Scally Aug. 12, 2024, 10:59 a.m. UTC | #2
Hi Sergei

On 04/08/2024 21:55, Sergei Trofimovich wrote:
> Without the change the build fails on upcoming `gcc-15` as:
>
>      In file included from ../src/libcamera/yaml_parser.cpp:8:
>      ../include/libcamera/internal/yaml_parser.h:183:41: error: 'uint8_t' was not declared in this scope
>        183 |                          std::is_same_v<uint8_t, T> ||
>            |                                         ^~~~~~~
>
> Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
> ---
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
>   include/libcamera/internal/yaml_parser.h | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h
> index e38a2df9..f8e4f841 100644
> --- a/include/libcamera/internal/yaml_parser.h
> +++ b/include/libcamera/internal/yaml_parser.h
> @@ -7,6 +7,8 @@
>   
>   #pragma once
>   
> +#include <stdint.h>
> +
>   #include <iterator>
>   #include <map>
>   #include <optional>

Patch
diff mbox series

diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h
index e38a2df9..f8e4f841 100644
--- a/include/libcamera/internal/yaml_parser.h
+++ b/include/libcamera/internal/yaml_parser.h
@@ -7,6 +7,8 @@ 
 
 #pragma once
 
+#include <stdint.h>
+
 #include <iterator>
 #include <map>
 #include <optional>