GDS3D icon indicating copy to clipboard operation
GDS3D copied to clipboard

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

Open yurivict opened this issue 2 years ago • 3 comments

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

yurivict avatar Oct 04 '21 06:10 yurivict

Hello Yuri,

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

Best regards,

Trilomix

trilomix avatar Oct 04 '21 13:10 trilomix

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.

yurivict avatar Oct 04 '21 16:10 yurivict

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

trilomix avatar Oct 05 '21 06:10 trilomix