<div dir='auto'><div>Hi Kieran,<br><div class="gmail_extra"><br><div class="gmail_quote">On Jun 8, 2020 9:23 PM, Kieran Bingham <kieran.bingham@ideasonboard.com> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi Umang,
<br>

<br>
On 08/06/2020 16:22, Umang Jain wrote:
<br>
> The hex stream output helper was introduced in f391048a7b98 ("libcamera: utils:
<br>
> Add hex stream output helper"). It simplifies writing hexadecimal values to an
<br>

<br>
That's the right way to reference another commit...
<br>

<br>
> ostream which can be used in this test too. As the helper doesn't modify the
<br>
> stream configuration (refer to utils::hex() documentation), this eliminates the
<br>
> need of restoring the stream's format state as pointed out by the coverity scan.
<br>

<br>
> Fixes: f391048a7b98 ("libcamera: utils: Add hex stream output helper")
<br></p></blockquote></div></div></div><div dir="auto">Yes, I wondered for a while but I thought it might have missed to address this file's bit in <span style="font-family: sans-serif;">f391048a7b98. Also, I think I mis-understood Laurent's review initially. Re-reading it makes it clear to me. Apologies.</span></div><div dir="auto"><span style="font-family: sans-serif;">Thanks for taking care of it. </span></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"><br>
But this patch doesn't 'fix' f391048a, in that this wasn't an issue
<br>
introduced by that patch.
<br>

<br>
I can just remove this tag when applying though, thanks.
<br>

<br>
--
<br>
Kieran
<br>

<br>

<br>
> Reported-by: Coverity CID=279058
<br>
> Signed-off-by: Umang Jain <email@uajain.com>
<br>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
<br>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
<br>
> ---
<br>
>  test/v4l2_subdevice/list_formats.cpp | 5 ++---
<br>
>  1 file changed, 2 insertions(+), 3 deletions(-)
<br>

<br>
> diff --git a/test/v4l2_subdevice/list_formats.cpp b/test/v4l2_subdevice/list_formats.cpp
<br>
> index 25503c3..a55af11 100644
<br>
> --- a/test/v4l2_subdevice/list_formats.cpp
<br>
> +++ b/test/v4l2_subdevice/list_formats.cpp
<br>
> @@ -5,12 +5,12 @@
<br>
>   * libcamera V4L2 Subdevice format handling test
<br>
>   */
<br>
>  
<br>
> -#include <iomanip>
<br>
>  #include <iostream>
<br>
>  #include <vector>
<br>
>  
<br>
>  #include <libcamera/geometry.h>
<br>
>  
<br>
> +#include "libcamera/internal/utils.h"
<br>
>  #include "libcamera/internal/v4l2_subdevice.h"
<br>
>  
<br>
>  #include "v4l2_subdevice_test.h"
<br>
> @@ -36,8 +36,7 @@ void ListFormatsTest::printFormats(unsigned int pad,
<br>
>  {
<br>
>       cout << "Enumerate formats on pad " << pad << endl;
<br>
>       for (const SizeRange &size : sizes) {
<br>
> -          cout << "    mbus code: 0x" << setfill('0') << setw(4)
<br>
> -               << hex << code << endl;
<br>
> +          cout << "    mbus code: " << utils::hex(code, 4) << endl;
<br>
>               cout << "    min width: " << dec << size.min.width << endl;
<br>
>               cout << "    min height: " << dec << size.min.height << endl;
<br>
>               cout << "    max width: " << dec << size.max.width << endl;
<br>

<br>

<br>
-- 
<br>
Regards
<br>
--
<br>
Kieran
<br>
</p>
</blockquote></div><br></div></div></div><img src="https://u15657259.ct.sendgrid.net/wf/open?upn=GCEip0g28ftA9O9fsCR2M7x08El53O4YVYtHuSI-2FrLwtytoSlmO-2FnSq-2B0q807R-2FEyOocgqGAloN0JHOGqxkYqJU5LZhLUTODtRI0Y2HvSILFNyKxj71tscyoLYjo5GGxB8WMLvA-2Bl4LDA2P8fg7FtXzmsqp11lew1jBKSkmgb1VHLgNgHfm-2B1ryk1ihVP1Uuw1GGw8F2XDhyc9a0RKqszjd2HvJCLX600B2V0a-2BNEzXAiEuoltZ6KZKdqGCKQlOh" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>