~sircmpwn/hare-dev

harec: Fix casting of rconst to void v1 APPLIED

Ember Sawady: 1
 Fix casting of rconst to void

 2 files changed, 4 insertions(+), 1 deletions(-)
#844676 alpine.yml success
#844677 freebsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/hare-dev/patches/35311/mbox | git am -3
Learn more about email & git

[PATCH harec] Fix casting of rconst to void Export this patch

Signed-off-by: Ember Sawady <ecs@d2evs.net>
---
 src/check.c | 2 +-
 src/types.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/check.c b/src/check.c
index e4b912e..21d50d6 100644
--- a/src/check.c
+++ b/src/check.c
@@ -1440,7 +1440,7 @@ check_expr_cast(struct context *ctx,
			free(secondarytypename);
			return;
		}
		if (primary->storage == STORAGE_RCONST) {
		if (value->result->storage == STORAGE_RCONST) {
			uint32_t max = 0;
			switch (secondary->storage) {
			case STORAGE_RUNE:
diff --git a/src/types.c b/src/types.c
index 3cfdd81..99341ba 100644
--- a/src/types.c
+++ b/src/types.c
@@ -889,6 +889,9 @@ bool
type_is_castable(const struct type *to, const struct type *from)
{
	if (to->storage == STORAGE_VOID) {
		if (type_is_constant(from)) {
			lower_const(from, NULL);
		};
		return true;
	}

-- 
2.37.1
harec/patches: SUCCESS in 52s

[Fix casting of rconst to void][0] from [Ember Sawady][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/35311
[1]: mailto:ecs@d2evs.net

✓ #844676 SUCCESS harec/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/844676
✓ #844677 SUCCESS harec/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/844677
Thanks!

To git@git.sr.ht:~sircmpwn/harec
   825000c..dac4cd7  master -> master