--- /dev/null
+From e4ae0c567a6ec5e10c9f5ed44c61e4e3b6816c16 Mon Sep 17 00:00:00 2001
+From: Neal Gompa <neal@gompa.dev>
+Date: Wed, 18 Oct 2023 08:31:03 -0400
+Subject: [PATCH] app: Fix invalid comparison of c_buf in write_y4m_header
+
+This fixes the following error:
+
+/builddir/build/BUILD/xevd-0.4.1/app/xevd_app.c: In function 'write_y4m_header':
+/builddir/build/BUILD/xevd-0.4.1/app/xevd_app.c:300:15: error: the comparison will always evaluate as 'false' for the address of 'c_buf' will never be NULL [-Werror=address]
+ 300 | if (c_buf == NULL)
+ | ^~
+---
+ app/xevd_app.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/app/xevd_app.c b/app/xevd_app.c
+index abc1f17..ed1fbcd 100644
+--- a/app/xevd_app.c
++++ b/app/xevd_app.c
+@@ -273,8 +273,8 @@ static int write_y4m_header(char * fname, XEVD_IMGB * img)
+ int bit_depth = op_out_bit_depth;
+ int len = 80;
+ int buff_len = 0;
+- char buf[80] = { 0, };
+- char c_buf[16] = { 0, };
++ char buf[80] = { '\0', };
++ char c_buf[16] = { '\0', };
+ FILE * fp;
+
+ if (color_format == XEVD_CF_YCBCR420)
+@@ -297,7 +297,7 @@ static int write_y4m_header(char * fname, XEVD_IMGB * img)
+ if (bit_depth == 8) strcpy(c_buf, "mono");
+ }
+
+- if (c_buf == NULL)
++ if (strlen(c_buf) == 0)
+ {
+ logv0("Color format is not suuported by y4m");
+ return XEVD_ERR;
Patch0: %{name}-string.patch
Patch1: %{name}-link.patch
Patch2: %{name}-dangling-pointer.patch
+Patch3: %{name}-comparison.patch
URL: https://github.com/mpeg5/xevd
BuildRequires: cmake >= 3.5
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
echo "v%{version}" > version.txt