Hi Hejun, Can you make this change as a pull request? That is the best way.
Thank you Pieter On Tue, Dec 17, 2013 at 3:31 PM, Hejun (Jun He) <[email protected]> wrote: > ________________________________ > > 发件人: Hongsibao > 发送时间: 2013年12月17日 20:00 > 收件人: Hejun (Jun He); Xiamingzhen > 主题: 关于zeromq的一个bug,请转发邮件给:[email protected] > > > > OS version: SUSE Linux Enterprise Server 11 (x86_64) > > G++(gcc) version: gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE > Linux) > > zeroMQ version: 4.0.3 > > > > Issue: > > When compile my code with zeromq, there is a warnning of > "zeromq-4.0.3/src/ipc_listener.cpp:127: warning: the use of `tempnam' is > dangerous, better use `mkstemp' " > > reported by gcc . > > The warning means the gcc recommend to use mkstemp instead of tempnam. > > I hope you can resolve this warning , because it will block the using of > zmq. > > > > > > here a example of fix the warning. > > Code(ipc_listener.cpp): > > > > static char buffer[12] = "2134XXXXXX"; > > // Allow wildcard file > > if (addr[0] == '*') { > > mkstemp(buffer); > > addr.assign (buffer); > > } > > > > #if 0 > > // Allow wildcard file > > if (addr[0] == '*') { > > char *tmpstr = tempnam (NULL, NULL); > > addr.assign (tmpstr); > > free (tmpstr); > > } > > #endif > > > > Pls see the attachment of the code file:ipc_listener.cpp > > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
