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

Compiler warnings on Visual C++ 2019 and x64 target #165

Closed
rysavyjan opened this issue Jun 21, 2019 · 1 comment · Fixed by #166
Closed

Compiler warnings on Visual C++ 2019 and x64 target #165

rysavyjan opened this issue Jun 21, 2019 · 1 comment · Fixed by #166

Comments

@rysavyjan
Copy link

While compiling cmark-gfm library with Visual C++ 2019 (x64 target), we are receiving following warnings:

cmark-gfm\extensions\tasklist.c(23,28): warning C4311:  'type cast': pointer truncation from 'void *' to 'int'
cmark-gfm\extensions\tasklist.c(96,30): warning C4311:  'type cast': pointer truncation from 'void *' to 'int'
cmark-gfm\extensions\tasklist.c(117,30): warning C4311:  'type cast': pointer truncation from 'void *' to 'int'
cmark-gfm\extensions\tasklist.c(129,28): warning C4311:  'type cast': pointer truncation from 'void *' to 'int'
...
    void *opaque;
...
  if ((int)node->as.opaque == CMARK_TASKLIST_CHECKED) {
    return true;
  }
@kivikakk
Copy link

Thanks for the report! Would you consider submitting a PR adding the appropriate casts?

rysavyjan added a commit to rysavyjan/cmark-gfm that referenced this issue Jun 21, 2019
warning C4311: 'type cast': pointer truncation from 'void *' to 'int'
Fixes github#165
kivikakk pushed a commit that referenced this issue Jun 21, 2019
warning C4311: 'type cast': pointer truncation from 'void *' to 'int'
Fixes #165
talum pushed a commit that referenced this issue Sep 14, 2021
warning C4311: 'type cast': pointer truncation from 'void *' to 'int'
Fixes #165
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 a pull request may close this issue.

2 participants