[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/parsetexi/api.c (element_to_perl_
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/XS/parsetexi/api.c (element_to_perl_hash): Cast pointer to intptr_t before IV to prevent a compiler warning on MinGW. Suggestion from Eli Zaretskii. |
Date: |
Mon, 01 Mar 2021 10:17:21 -0500 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 570f2b7 * tp/Texinfo/XS/parsetexi/api.c (element_to_perl_hash): Cast
pointer to intptr_t before IV to prevent a compiler warning on MinGW.
Suggestion from Eli Zaretskii.
570f2b7 is described below
commit 570f2b784a89726fcd11e61163c0a6fd6a8ef1fd
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Mar 1 15:17:10 2021 +0000
* tp/Texinfo/XS/parsetexi/api.c (element_to_perl_hash):
Cast pointer to intptr_t before IV to prevent a compiler warning
on MinGW. Suggestion from Eli Zaretskii.
---
ChangeLog | 6 ++++++
tp/Texinfo/XS/parsetexi/api.c | 6 ++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 33afdee..e4a32c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-03-01 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/XS/parsetexi/api.c (element_to_perl_hash):
+ Cast pointer to intptr_t before IV to prevent a compiler warning
+ on MinGW. Suggestion from Eli Zaretskii.
+
2021-02-28 Gavin Smith <gavinsmith0123@gmail.com>
Simplify, update, document infrastructure
diff --git a/tp/Texinfo/XS/parsetexi/api.c b/tp/Texinfo/XS/parsetexi/api.c
index 047dffc..2189de6 100644
--- a/tp/Texinfo/XS/parsetexi/api.c
+++ b/tp/Texinfo/XS/parsetexi/api.c
@@ -427,8 +427,10 @@ element_to_perl_hash (ELEMENT *e)
break;
}
case extra_integer:
- { /* A simple integer. */
- IV value = (IV) f;
+ { /* A simple integer. The intptr_t cast here prevents
+ a warning on MinGW ("cast from pointer to integer of
+ different size"). */
+ IV value = (IV) (intptr_t) f;
STORE(newSViv (value));
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/parsetexi/api.c (element_to_perl_hash): Cast pointer to intptr_t before IV to prevent a compiler warning on MinGW. Suggestion from Eli Zaretskii.,
Gavin D. Smith <=