Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jan 2025 21:47:06 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3ee0f32c60fa - main - devel/generate: fix build on 32-bits
Message-ID:  <202501172147.50HLl671062863@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3ee0f32c60faf217508321fe99a8bd1cacbfb534

commit 3ee0f32c60faf217508321fe99a8bd1cacbfb534
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2025-01-16 13:17:17 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2025-01-17 21:45:26 +0000

    devel/generate: fix build on 32-bits
    
    generate.c:154:79: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
      154 |     if (infile) fprintf(stderr, "generate: file %s line %ld: ", infile->name, infile->xline);
          |                                                         ~~~                   ^~~~~~~~~~~~~
          |                                                         %zu
    1 error generated.
---
 devel/generate/files/patch-generate.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/devel/generate/files/patch-generate.c b/devel/generate/files/patch-generate.c
new file mode 100644
index 000000000000..0176994c0f8d
--- /dev/null
+++ b/devel/generate/files/patch-generate.c
@@ -0,0 +1,11 @@
+--- generate.c.orig	2025-01-16 13:10:40 UTC
++++ generate.c
+@@ -151,7 +151,7 @@ fatal(const char *s,...)
+ {
+     va_list         argptr;
+ 
+-    if (infile) fprintf(stderr, "generate: file %s line %ld: ", infile->name, infile->xline);
++    if (infile) fprintf(stderr, "generate: file %s line %zu: ", infile->name, infile->xline);
+     else fprintf(stderr, "generate: ");
+ 
+     va_start(argptr, s);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501172147.50HLl671062863>