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

Remove warnings c compiler #789

Merged
merged 8 commits into from
May 2, 2024

Conversation

PalumboN
Copy link
Collaborator

@PalumboN PalumboN commented Apr 30, 2024

Bye flags for warnings:

  • -Wno-conditional-type-mismatch
  • -Wno-incompatible-pointer-types

And fixing other warnings from C compiler

@PalumboN PalumboN requested a review from guillep April 30, 2024 15:45
@PalumboN PalumboN added the dojo Things developed on VM Dojos label Apr 30, 2024
Comment on lines -2309 to +2313
return ((isBytes(socketOop))
&& ((byteSizeOf(socketOop)) == (sizeof(SQSocket)))
? ((SocketPtr) (firstIndexableField(socketOop)))
: (primitiveFailFor(PrimErrBadArgument),
null));
if ((isBytes(socketOop)) && ((byteSizeOf(socketOop)) == (sizeof(SQSocket)))) {
return (SocketPtr) (firstIndexableField(socketOop));
}
primitiveFailFor(PrimErrBadArgument);
return null;
Copy link
Member

Choose a reason for hiding this comment

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

Why would this rewrite remove the warning? do you know?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because there is not the expression with the complex type I guess (split into many statements)

@@ -14736,6 +14736,7 @@ StackInterpreter >> stackPointerIndexForFrame: theFP [
<var: #theFP type: #'char *'>
<var: #thePage type: #'StackPage *'>
<var: #theSP type: #'char *'>
<returnTypeC: #sqInt>
Copy link
Member

Choose a reason for hiding this comment

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

Oh yes :)

Is this a problem with the type inferencer? Something worth improving there as a separate issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not just the type inferer, the problem is to have char* types in pointers to the stack (the type inference is doing good it's work).

I already opened an issue for that.

Copy link
Member

@guillep guillep left a comment

Choose a reason for hiding this comment

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

LGTM!

@guillep guillep merged commit bd07089 into pharo-project:pharo-10 May 2, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dojo Things developed on VM Dojos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants