jrincayc / ucblogo-code

Berkeley Logo interpreter
https://people.eecs.berkeley.edu/~bh/logo.html
GNU General Public License v3.0
187 stars 34 forks source link

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

Closed dmalec closed 1 year ago

dmalec commented 1 year ago

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

jrincayc commented 1 year ago

Thank you for the pull request :)

dmalec commented 1 year ago

You're welcome, no worries :)