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

WIP: Compiler Fixes #3

Merged
merged 23 commits into from
Jun 21, 2020
Merged

Conversation

luciensadi
Copy link
Contributor

@luciensadi luciensadi commented Jun 21, 2020

This resolves many of the compiler warnings, fixes a few latent bugs, and also enables OS X support. I made a single commit per change where possible, so the commit list is a pretty close representation of the changes made here.

This MR is flagged WIP until #2 can be resolved, as it doesn't build cleanly on my machine without that. I've posted it now in hopes of getting some early feedback.

luciensadi and others added 23 commits June 21, 2020 14:26
I do believe that NULL test is necessary, not sure why Mac made you change that to [0]
Copy link
Owner

@Seifert69 Seifert69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@Seifert69 Seifert69 merged commit e380eb4 into Seifert69:master Jun 21, 2020
@@ -233,7 +233,7 @@ class unit_data *zone_equip(class unit_data *u, struct zone_reset_cmd *cmd)
class unit_data *
zone_door(class unit_data *u, struct zone_reset_cmd *cmd)
{
if (!cmd->fi[0] || (cmd->fi[0]->type != UNIT_ST_ROOM))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

->fi is an array of pointers (structs.h says it's class file_index_type *fi[2];), so evaluating the array itself will always return true, but evaluating the value of the thing pointed to by the first pointer in the array will return true or false depending on whether or not the pointer has been set.

@Seifert69
Copy link
Owner

Seifert69 commented Jun 21, 2020 via email

@prool prool mentioned this pull request Aug 3, 2020
Seifert69 pushed a commit that referenced this pull request Aug 17, 2020
Fizzie68 added a commit that referenced this pull request Sep 28, 2020
Seifert69 pushed a commit that referenced this pull request Oct 24, 2020
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