-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
… with `make LCRYPT='' all`.
…haracter of array.
…. Cleaned up double-parens in ifcheck.
…per the first issue in Seifert69/DikuMUD.
I do believe that NULL test is necessary, not sure why Mac made you change that to [0]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👍
vme/src/zone_reset.cpp
Outdated
@@ -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)) |
There was a problem hiding this comment.
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.
You're right - it's indeed an array. :-) I changed it back to your code and
pushed it up.
…On Mon, Jun 22, 2020 at 1:01 AM luciensadi ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In vme/src/zone_reset.cpp
<#3 (comment)>:
> @@ -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))
->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.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#3 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOOOMXVM2RNHLR3TCRPSB6DRX2GLDANCNFSM4OEBWRUA>
.
|
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.