pointcloud.cpp -Werror=sign-compare

Skip to first unread message

Mitch Prater

Apr 30, 2020, 4:19:16 PM4/30/20
to OSL Developers
I'm getting this compiler error from the current master:

/home/mprater/osl/src/liboslexec/pointcloud.cpp: In member function ‘virtual int OSL_v1_11::RendererServices::pointcloud_get(OSL_v1_11::ShaderGlobals*, OpenImageIO_v2_0::ustring, size_t*, int, OpenImageIO_v2_0::ustring, OpenImageIO_v2_0::TypeDesc, void*)’:
/home/mprater/osl/src/liboslexec/pointcloud.cpp:379:30: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
         for (size_t i = 0; i < count; ++i) {
Looks like the change to pointcloud.cpp happened between 16 April and 21 April commits. It's a chunk of code, so I'm not sure about touching it myself.


Larry Gritz

Apr 30, 2020, 4:41:58 PM4/30/20
to OSL Developers List
My bad.

That "size_t" I believe should be "int".

I'm not sure how that slipped through the CI.  Oh, maybe the CI does not have partio installed, and skipped this section?

-- lg
Larry Gritz

Mitch Prater

Apr 30, 2020, 5:57:34 PM4/30/20
to OSL Developers
Sounds about right.
Reply all
Reply to author
0 new messages