lip6 / coriolis

Coriolis VLSI EDA Tool (LIP6)
https://coriolis.lip6.fr
GNU General Public License v2.0
47 stars 5 forks source link

Fix usage of getcwd #63

Open robtaylor opened 10 months ago

robtaylor commented 10 months ago
../../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?!

robtaylor commented 10 months ago

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

jpc-lip6 commented 10 months ago

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.