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

error: assigning to 'size_t' (aka 'unsigned long') from incompatible type 'nullptr_t' #14

Open
yurivict opened this issue Oct 4, 2021 · 3 comments

Comments

@yurivict
Copy link

yurivict commented Oct 4, 2021

clang-11 complains:

../libgdsto3d/gdspolygon.cpp:1574:21: error: assigning to 'size_t' (aka 'unsigned long') from incompatible type 'nullptr_t'
        _FrameStartIndex = NULL;
                           ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~
../libgdsto3d/gdspolygon.cpp:1575:23: error: assigning to 'size_t' (aka 'unsigned long') from incompatible type 'nullptr_t'
        _FrameCurrentIndex = NULL;
                             ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~
../libgdsto3d/gdspolygon.cpp:1578:27: error: assigning to 'size_t' (aka 'unsigned long') from incompatible type 'nullptr_t'
        poly->_FrameStartIndex = NULL;
                                 ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~
../libgdsto3d/gdspolygon.cpp:1579:29: error: assigning to 'size_t' (aka 'unsigned long') from incompatible type 'nullptr_t'
        poly->_FrameCurrentIndex = NULL;
                                   ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~

Index can't be assigned to NULL.

FreeBSD 13

@trilomix
Copy link
Owner

trilomix commented Oct 4, 2021

Hello Yuri,

Can you explain what is the purpose of this issue?
What do you try to do?

Best regards,

Trilomix

@yurivict
Copy link
Author

yurivict commented Oct 4, 2021

Can you explain what is the purpose of this issue?
What do you try to do?

Reporting the bug that I discovered while building GDS3D on FreeBSD.

@trilomix
Copy link
Owner

trilomix commented Oct 5, 2021

Sorry M. Yuri,
I don't used FreeBSD and I can't reproduce the error.
Perhaps you can try to modify the make file with the pull request. I didn't push it as this update make the compilation failed on old platform we are still using...
Regards,
Trilomix

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

No branches or pull requests

2 participants