Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Nov 2023 05:30:40 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 40b96315e04e - main - textproc/rubygem-prism: Fix build on i386
Message-ID:  <202311010530.3A15Ue2j004331@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=40b96315e04e2f00ea94d61018b86ebe51c9366e

commit 40b96315e04e2f00ea94d61018b86ebe51c9366e
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-11-01 05:30:12 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-11-01 05:30:12 +0000

    textproc/rubygem-prism: Fix build on i386
    
    src/serialize.c:1753:68: error: implicit conversion changes signedness: 'uint32_t' (aka 'unsigned int') to 'ptrdiff_t' (aka 'int') [-Werror,-Wsign-conversion]
        pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32(magic_comment->key_length));
                                     ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~^~~~~~~~~~
    src/serialize.c:1757:68: error: implicit conversion changes signedness: 'uint32_t' (aka 'unsigned int') to 'ptrdiff_t' (aka 'int') [-Werror,-Wsign-conversion]
        pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32(magic_comment->value_length));
                                     ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~^~~~~~~~~~~~
    2 errors generated.
    
    Reference:      https://pkg-status.freebsd.org/beefy17/data/main-i386-default/p3130e470f7e6_sc656f5c1a6/logs/rubygem-prism-0.14.0.log
                    https://pkg-status.freebsd.org/beefy11/data/140releng-i386-default/16bdcaa2bc90/logs/rubygem-prism-0.14.0.log
                    https://pkg-status.freebsd.org/beefy15/data/132i386-default/3130e470f7e6/logs/rubygem-prism-0.14.0.log
                    https://pkg-status.freebsd.org/beefy5/data/124i386-default/16bdcaa2bc90/logs/rubygem-prism-0.14.0.log
---
 textproc/rubygem-prism/files/patch-src-serialize.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/textproc/rubygem-prism/files/patch-src-serialize.c b/textproc/rubygem-prism/files/patch-src-serialize.c
new file mode 100644
index 000000000000..640ae37fb92d
--- /dev/null
+++ b/textproc/rubygem-prism/files/patch-src-serialize.c
@@ -0,0 +1,16 @@
+--- src/serialize.c.orig	2023-10-27 04:54:49 UTC
++++ src/serialize.c
+@@ -1788,11 +1788,11 @@ static void
+ pm_serialize_magic_comment(pm_parser_t *parser, pm_magic_comment_t *magic_comment, pm_buffer_t *buffer) {
+     // serialize key location
+     pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32(magic_comment->key_start - parser->start));
+-    pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32(magic_comment->key_length));
++    pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32((ptrdiff_t) magic_comment->key_length));
+ 
+     // serialize value location
+     pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32(magic_comment->value_start - parser->start));
+-    pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32(magic_comment->value_length));
++    pm_buffer_append_u32(buffer, pm_ptrdifft_to_u32((ptrdiff_t) magic_comment->value_length));
+ }
+ 
+ static void



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