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

warning: the use of tmpnam is dangerous, better use mkstemp #2675

Open
Saviq opened this issue Sep 27, 2022 · 1 comment
Open

warning: the use of tmpnam is dangerous, better use mkstemp #2675

Saviq opened this issue Sep 27, 2022 · 1 comment
Labels

Comments

@Saviq
Copy link
Collaborator

Saviq commented Sep 27, 2022

/usr/bin/ld: tests/miral/CMakeFiles/miral-test.dir/external_client.cpp.o: in function `(anonymous namespace)::ExternalClient::ExternalClient()':                                                                                              
/home/michal/dev/MirServer/mir/tests/miral/external_client.cpp:32: warning: the use of `tmpnam' is dangerous, better use `mkstemp'                                                                                                            
/usr/bin/ld: tests/miral/CMakeFiles/miral-test-internal.dir/static_display_config.cpp.o: in function `StaticDisplayConfig_nonexistent_config_file_is_no_error_Test::TestBody()':                                                              
/home/michal/dev/MirServer/mir/tests/miral/static_display_config.cpp:151: warning: the use of `tmpnam' is dangerous, better use `mkstemp' 
@Saviq Saviq changed the title warning: the use of tmpnam' is dangerous, better use mkstemp' warning: the use of tmpnam is dangerous, better use mkstemp Sep 27, 2022
@AlanGriffiths
Copy link
Contributor

I've no doubt that this can be done better, just think solving it is more than a "first issue": mkstemp() doesn't provide a filename that can be used with external_client.launch() or StaticDisplayConfig (and I've not found an incantation to disable the warning from the linker).

Saviq added a commit that referenced this issue Jul 18, 2024
Saviq added a commit that referenced this issue Jul 18, 2024
Saviq added a commit that referenced this issue Jul 18, 2024
Saviq added a commit that referenced this issue Jul 18, 2024
Saviq added a commit that referenced this issue Jul 18, 2024
Saviq added a commit that referenced this issue Jul 18, 2024
Saviq added a commit that referenced this issue Jul 18, 2024
Saviq added a commit that referenced this issue Jul 18, 2024
Saviq added a commit that referenced this issue Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants