coriolis
coriolis copied to clipboard
Fix usage of getcwd
../../hurricane/src/viewer/CellViewer.cpp:893:12: warning: ignoring return value of ‘char* getcwd(char*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
893 | getcwd ( workingDirectory, 1024 );
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
should probably use modern getcwd that allocates the right length buffer. But why is this being used?!
Other places its being used: lefdef - probably ok to leave crlcore/python/helpers/init.py bora/python/initHook.py bootstrap/socInstaller.py hurricane/src/utilities/Path.cpp
For CellViewer, the name of the function it is in gives a clue : CellViewer::imageDisplay(). We get the cwd to save the image (PNG or whatever) in it.
- lefdef : we don't touch unless it really cause a problem.
- ignore what's in
bootstrapit's for developers only. Maybe deprecated, not a priority anyway. - In
crlcore, it is part of the early initialization process and likely could be removed. - In
katana/python/initHook.py, I wonder how it can be removed, as it is to look inside the currently running directory for user-defined, on the fly, python patchs (typically: configure debugging).