Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several warnings, changed some struct members from char to int #8

Merged
merged 7 commits into from
Mar 2, 2021

Conversation

mingodad
Copy link
Contributor

Nice project !
In this first look I fixed several compiler warnings.

@mingodad
Copy link
Contributor Author

TODO: need to free wat_strs in function to_wat.c::tree_to_wat

@LingDong-
Copy link
Owner

LingDong- commented Dec 28, 2020

Hi @mingodad ,

Thanks so much for all the fixes!

Looks good! Just wondering about a couple things:

  • Changing (x)?(y):(z) to x?y:z, wouldn't that become problematic if one of the three operands is an assignment? e.g. (x=0)?1:2 is different from x=0?1:2. Or perhaps not omitting the parenthesis in (x=y) also avoids the problem.
  • So glad the segfault is fixed! So it looks like it was because some of the structs are not zeroed? Just curious.
  • Changing char struct members to int: I know due to alignment, the final size of the struct won't be affected in those cases, but is there any particular reason for the change?

I haven't tested the changes yet, will clone your fork in a bit and try them out :)

Thanks again for the fixes!

@LingDong- LingDong- merged commit 03e0173 into LingDong-:main Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants