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

Fix measure.c memory leak and warnings/errors with newer gcc/glibc and vc++ #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rheit
Copy link

@rheit rheit commented Dec 3, 2020

This patch fixes warnings from gcc and glibc that prevent compilation with -Werror, updates apple1basic.c to the new API, fixes the #ifdef _WIN32 block in that file, and fixes a memory leak in measure.c.

I fixed the Makefile issue by creating a single Makefile that can build cbmbasic, apple1basic, and measure all at once or individually. However, since this changes the Makefile system from three files to one, I left it out of this pull request. If desired, I could add that. The other alternative is to comment out the OBJS+=measure.o line again.

Also fixes a memory leak in measure.c
@drfiemost
Copy link
Contributor

Nice, builds clean on gcc9 and gcc10. This would fix #9

@szabadulas
Copy link

szabadulas commented Dec 16, 2020

This pull request also fixes an unreported massive memory leak in measure.c, resetChip_test(). This fact should be made more prominent. Or should the error be reported to catch the developer's attention?

Edit: Oh, I see rheit has mentioned it in the first sentence. Still, it is an important fix, but it’s all too easy to skim over it.

@rheit rheit changed the title Fix warnings/errors with newer gcc/glibc and vc++ Fix measure.c memory leak and warnings/errors with newer gcc/glibc and vc++ Dec 16, 2020
Copy link

@UplinkCoder UplinkCoder left a comment

Choose a reason for hiding this comment

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

LGTM

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.

None yet

4 participants