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

send_mess() uses 'const char *' #2

Merged
merged 1 commit into from
Sep 27, 2019

Conversation

tboegi
Copy link
Contributor

@tboegi tboegi commented Sep 20, 2019

The 3rd parameter in send_mess(), "name" can and should
be a 'const char *' instead of just 'char *'.
Modern compilers complain here, so that the signature now
gets the const.

This is a minimal part of a series from Dirk Zimoch,
more warnings can be removed here and there.

@kmpeters
Copy link
Contributor

@tboegi, did you mean for removal of (struct controller *) and (struct mess_node *) from drvOmsPC68.cc to be included in this pull request? I assume the removal of them eliminates other compiler warnings.

@tboegi
Copy link
Contributor Author

tboegi commented Sep 26, 2019

@kmpeters Thanks for the review-
The removal of the cast (xxx*)NULL sneaked in here-
It should be in a separate commit.
I will fix this.

The 3rd parameter in send_mess(), "name" can and should
be a 'const char *' instead of just 'char *'.
Modern compilers complain here, so that the signature now
gets the const.

While here, change static constant strings, like
static const char *oms_axis[]

This is a minimal part of a series from Dirk Zimoch,
more warnings can be removed here and there.
@tboegi
Copy link
Contributor Author

tboegi commented Sep 26, 2019

@kmpeters :
I pushed a new version with a cleaned up commit

@kmpeters
Copy link
Contributor

@tboegi, I'm still confused. Should the changes to lines 844, 849, 850, 852, 853, and 894 of drvOmsPC68.cc be a part of this commit? It looks like they might resolve related, but slightly different warning messages that may be a part of the future pull-requests you mentioned.

@tboegi tboegi force-pushed the 190920_send_mess_uses_const_char branch from 1a72e57 to 261383e Compare September 27, 2019 14:57
@tboegi
Copy link
Contributor Author

tboegi commented Sep 27, 2019

Sorry for the confusion,
I messed up the branch names when pushing.
Commit 261383e should be the new one.

@kmpeters
Copy link
Contributor

This looks good.

@kmpeters kmpeters merged commit ee078b3 into master Sep 27, 2019
@kmpeters kmpeters deleted the 190920_send_mess_uses_const_char branch September 27, 2019 15:22
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