mirror of https://github.com/nirenjan/libx52.git
Fix warnings about uninitialized variables
parent
15b8abf3c6
commit
95e933e27c
|
@ -22,7 +22,7 @@
|
|||
int libx52_vendor_command(libx52_device *x52, uint16_t index, uint16_t value)
|
||||
{
|
||||
int j;
|
||||
int rc;
|
||||
int rc = LIBUSB_ERROR_OTHER;
|
||||
|
||||
/* Allow retry in case of failure */
|
||||
for (j = 0; j < 3; j++) {
|
||||
|
@ -110,7 +110,7 @@ static int libx52_write_date(libx52_device *x52)
|
|||
|
||||
static int libx52_write_time(libx52_device *x52, libx52_clock_id clock)
|
||||
{
|
||||
uint16_t value;
|
||||
uint16_t value = 0;
|
||||
uint16_t index;
|
||||
int offset;
|
||||
int negative;
|
||||
|
@ -168,7 +168,7 @@ int libx52_update(libx52_device *x52)
|
|||
unsigned int i;
|
||||
uint32_t update_mask;
|
||||
uint16_t value;
|
||||
int rc;
|
||||
int rc = LIBUSB_ERROR_OTHER;
|
||||
|
||||
/* Save the update mask */
|
||||
update_mask = x52->update_mask;
|
||||
|
|
|
@ -39,7 +39,7 @@ int libx52_set_clock(libx52_device *x52, time_t time, int local)
|
|||
/* timezone from time.h presents the offset in seconds west of GMT.
|
||||
* Negate and divide by 60 to get the offset in minutes east of GMT.
|
||||
*/
|
||||
local_tz = -timezone / 60;
|
||||
local_tz = (int)(-timezone / 60);
|
||||
} else {
|
||||
timeval = *gmtime(&time);
|
||||
/* No offset from GMT */
|
||||
|
|
Loading…
Reference in New Issue