Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage of getcwd #63

Open
robtaylor opened this issue Oct 13, 2023 · 2 comments
Open

Fix usage of getcwd #63

robtaylor opened this issue Oct 13, 2023 · 2 comments

Comments

@robtaylor
Copy link
Collaborator

../../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
Copy link
Collaborator Author

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
Copy link
Collaborator

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 bootstrap it'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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants