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

ISSUE-20: Resolving warnings about discarding const qualifier on assignment. #141

Merged
merged 1 commit into from
Jan 7, 2023

Conversation

dmalec
Copy link
Collaborator

@dmalec dmalec commented Jan 7, 2023

Summary

Resolves the following three warnings:

init.c:710:11: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                logolib = newlib;
                        ^ ~~~~~~

init.c:714:8: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                csls = newcsls;
                     ^ ~~~~~~~

init.c:717:13: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                helpfiles = newhelp;
                          ^ ~~~~~~~

Testing

Tested that HELP can load helpfiles:

? HELP "name
NAME value varname                                      (library procedure)

        command.  Same as MAKE but with the inputs in reverse order.

Tested that library procedures can be called:

? NAME 5 "foo
? PRINT :foo
5

Tested that CSLS files can be loaded:

? CSLSLOAD "basic
? BASIC

READY

10 PRINT "HELLO"

READY

20 PRINT "WORLD"

READY

RUN
HELLO
WORLD

READY

Test Environments

  • OSX Catalina (10.15.7) w/ wxWidgets 3.0.5
  • Ubuntu Bionic (18.04.5) w/ wxWidgets 3.0.5

  • Windows 10 Pro (19045.2364) w/ wxWidgets 3.0.5

…gnment.

Resolves the following three warnings:

init.c:710:11: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                logolib = newlib;
                        ^ ~~~~~~

init.c:714:8: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                csls = newcsls;
                     ^ ~~~~~~~

init.c:717:13: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                helpfiles = newhelp;
                          ^ ~~~~~~~
Copy link
Owner

@jrincayc jrincayc left a comment

Choose a reason for hiding this comment

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

Reviewed and approve.

@jrincayc jrincayc merged commit bffcbcb into jrincayc:master Jan 7, 2023
@jrincayc
Copy link
Owner

jrincayc commented Jan 7, 2023

Thank you for the pull request :)

@dmalec
Copy link
Collaborator Author

dmalec commented Jan 7, 2023

You're welcome, no worries :)

@dmalec dmalec deleted the ISSUE-20-MAC-PATH-CAST branch January 18, 2023 18:08
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