helpme icon indicating copy to clipboard operation
helpme copied to clipboard

Fix compiler warnings

Open drroe opened this issue 4 years ago • 1 comments

This fixes several warnings that would be generated by GNU compilers with -Wall, mostly signed/unsigned comparisons, adding preprocessor guards for OpenMP #pragmas, and initializing uninitialized variables.

@andysim There is one change I would like you to review. In helpme.h line 1603 there was an unused variable that I commented out:

            auto &mySplineList = splinesPerThread_[threadID];
            //const auto &gridIteratorC = threadedGridIteratorC_[threadID]; FIXME currently unused
            mySplineList.clear();

There is a class variable gridIteratorC_ that is being used instead below this. Should gridIteratorC_ be getting assigned from threadedGridIteratorC_? Commenting it out doesn't seem to break anything but it looks like it might actually have a purpose so I wanted to check with you.

drroe avatar Nov 24 '21 15:11 drroe

@andysim OK, I'm not as experienced in the code coverage area - seems like it's failing because I added an extra check to make sure the signed vars aren't negative before casting to unsigned. Do I need to now add new tests?

drroe avatar Nov 24 '21 15:11 drroe