From 3d2c1401cbbe6d57e120f386ff8976e768dcd7ce Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Thu, 25 Aug 2011 19:03:10 +0000 Subject: [PATCH] Fix warnings. * ser_avrdoper.c: add so exit() is declared. * usbtiny.c (usbtiny_open): provide an initializer to a "may be used uninitialized" variable (since GCC could not fully detect the logic behind). git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@981 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 8 ++++++++ ser_avrdoper.c | 1 + usbtiny.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b45324d2..ac826857 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-08-25 Joerg Wunsch + + Fix warnings. + * ser_avrdoper.c: add so exit() is declared. + * usbtiny.c (usbtiny_open): provide an initializer to a + "may be used uninitialized" variable (since GCC could not + fully detect the logic behind). + 2011-08-25 Joerg Wunsch * configure.ac: Add a check for FreeBSD's libusb-1.0 diff --git a/ser_avrdoper.c b/ser_avrdoper.c index e11fc39c..5a8e59fa 100644 --- a/ser_avrdoper.c +++ b/ser_avrdoper.c @@ -31,6 +31,7 @@ #include #include +#include #include "avrdude.h" #include "serial.h" diff --git a/usbtiny.c b/usbtiny.c index 638e2a13..56467577 100644 --- a/usbtiny.c +++ b/usbtiny.c @@ -197,7 +197,7 @@ static int usbtiny_open(PROGRAMMER* pgm, char* name) { struct usb_bus *bus; struct usb_device *dev = 0; - char *bus_name; + char *bus_name = NULL; char *dev_name = NULL; // if no -P was given or '-P usb' was given