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'
Created attachment 226511 [details] Patch
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 ?
Created attachment 226566 [details] Patch
(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.
(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.
Comment on attachment 226566 [details] Patch Clearing flags on attachment: 226566 Committed r165596: <http://trac.webkit.org/changeset/165596>
All reviewed patches have been landed. Closing bug.