Thanks for this report. On Wed, May 26, 2010 at 9:02 AM, Dean Brundage <[email protected]> wrote: > gcc -DHAVE_CONFIG_H -I. -g -O2 -Wall -Werror -I/usr/local/include > -c -o net.o net.c > net.c: In function `make_server_socket': > net.c:35: warning: 'fd' might be used uninitialized in this function
Here's a patch that should fix this. If you can confirm that it works I'll push it out to master. >From 349a98c0b651129d19e2376bd60d3adc0e19074f Mon Sep 17 00:00:00 2001 From: Keith Rarick <[email protected]> Date: Wed, 26 May 2010 20:50:28 -0700 Subject: [PATCH] Make sure fd is always initialized. --- net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net.c b/net.c index 9ca0602..d2d814c 100644 --- a/net.c +++ b/net.c @@ -32,7 +32,7 @@ static int brakes_are_on = 1, after_startup = 0; int make_server_socket(char *host, char *port) { - int fd, flags, r; + int fd = -1, flags, r; struct linger linger = {0, 0}; struct addrinfo *airoot, *ai, hints; -- 1.7.0.4 > Next: > > fdatasync binlog.o (symbol belongs to > implicit dependency /usr/lib/librt.so.1) > > This needed -lrt Any autoconf experts out there, how should I add this? I presume it goes somewhere in configure.in, but where? kr -- You received this message because you are subscribed to the Google Groups "beanstalk-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=en.
