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

Misc fix #78

Closed
wants to merge 2 commits into from
Closed

Misc fix #78

wants to merge 2 commits into from

Conversation

namhyung
Copy link

Hello,

This is just a couple of small random fixes, The first commit fixes a compiler warning and the second improves an error message when user gave a wrong type for a map expression.

Thanks,
Namhyung

  CC       provider/libply_la-special.lo
provider/special.c: In function ‘register_special_probes’:
provider/special.c:67:34: warning: ‘base_addr’ may be used uninitialized
                                   in this function [-Wmaybe-uninitialized]
   67 |  end_offset = (unsigned long)end - base_addr;
      |               ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
Sometimes I mistakenly type '$' instead of '@' for maps.  But the
error message was not clear and just showed an assertion failure.
Check the type of the node when it assignes to a map like below:

  # ply 'kr:vfs_read { $r["bytes"] = quantize(retval); }'
  <input>:1:14-25: error: expect map type, but get $r
  ERR:-22
wkz added a commit that referenced this pull request Nov 25, 2021
Small touch-up of the error message.
@wkz
Copy link
Collaborator

wkz commented Nov 25, 2021

Merged in 3f205bf

@wkz wkz closed this Nov 25, 2021
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