RESOLVED FIXED130132
[EFL][WK2] Fix compilation warning in Minibrowser
https://bugs.webkit.org/show_bug.cgi?id=130132
Summary [EFL][WK2] Fix compilation warning in Minibrowser
Sanghyup Lee
Reported 2014-03-12 08:42:33 PDT
Replace mktemp() to mkdtemp() to fix compilation warning in MiniBrowser. CMakeFiles/MiniBrowser.dir/main.c.o: In function `on_download_request': main.c:(.text.on_download_request+0x71): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
Attachments
Patch (1.43 KB, patch)
2014-03-12 08:49 PDT, Sanghyup Lee
no flags
Patch (1.52 KB, patch)
2014-03-12 18:08 PDT, Sanghyup Lee
no flags
Sanghyup Lee
Comment 1 2014-03-12 08:49:27 PDT
Csaba Osztrogonác
Comment 2 2014-03-12 10:15:05 PDT
Comment on attachment 226511 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226511&action=review > Tools/ChangeLog:8 > + Replace mktemp() with mkdtemp() to fix compilation warning in MiniBrowser. typo: you meant mkstemp instead of mkdtemp > Tools/MiniBrowser/efl/main.c:606 > - eina_strbuf_append(destination_path, mktemp(unique_path)); > + mkstemp(unique_path); > + eina_strbuf_append(destination_path, unique_path); Shouldn't we check if the return value is -1 ?
Sanghyup Lee
Comment 3 2014-03-12 18:08:52 PDT
Sanghyup Lee
Comment 4 2014-03-12 18:20:41 PDT
(In reply to comment #3) > Created an attachment (id=226566) [details] > Patch (In reply to comment #2) > (From update of attachment 226511 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=226511&action=review > > > Tools/ChangeLog:8 > > + Replace mktemp() with mkdtemp() to fix compilation warning in MiniBrowser. > > typo: you meant mkstemp instead of mkdtemp > > > Tools/MiniBrowser/efl/main.c:606 > > - eina_strbuf_append(destination_path, mktemp(unique_path)); > > + mkstemp(unique_path); > > + eina_strbuf_append(destination_path, unique_path); > > Shouldn't we check if the return value is -1 ? Thanks for review. I fixed it.
Sanghyup Lee
Comment 5 2014-03-12 18:22:05 PDT
(In reply to comment #2) > (From update of attachment 226511 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=226511&action=review > > > Tools/ChangeLog:8 > > + Replace mktemp() with mkdtemp() to fix compilation warning in MiniBrowser. > > typo: you meant mkstemp instead of mkdtemp > > > Tools/MiniBrowser/efl/main.c:606 > > - eina_strbuf_append(destination_path, mktemp(unique_path)); > > + mkstemp(unique_path); > > + eina_strbuf_append(destination_path, unique_path); > > Shouldn't we check if the return value is -1 ? Thanks for review. I fixed it.
WebKit Commit Bot
Comment 6 2014-03-13 19:31:53 PDT
Comment on attachment 226566 [details] Patch Clearing flags on attachment: 226566 Committed r165596: <http://trac.webkit.org/changeset/165596>
WebKit Commit Bot
Comment 7 2014-03-13 19:31:56 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.