Displaying 3 results from an estimated 3 matches for "belkin_nut_write_int".
2011 Oct 03
0
patch: Fix [-Wunused-but-set-variable]
...int instcmd(const char *cmdname, const c
/* set a variable */
static int setvar(const char *varname, const char *val)
{
- int i, r;
+ int i;
if (!strcasecmp(varname, "input.sensitivity")) {
for (i=0; i<asize(voltsens); i++) {
if (!strcasecmp(val, voltsens[i])) {
- r = belkin_nut_write_int(REG_VOLTSENS, i);
+ belkin_nut_write_int(REG_VOLTSENS, i);
+ /* r = belkin_nut_write_int(REG_VOLTSENS, i); */
return STAT_SET_HANDLED; /* Future: failure if r==-1 */
}
}
@@ -1261,13 +1262,13 @@ static int setvar(const char *varname, c
} else {
i=atoi(val);
}
- r = belk...
2006 Jun 09
0
Cleaned up belkinunv diff
...it
mode. Falling back to the original behaviour.");
} else {
upslogx(LOG_WARNING, "belkinunv: WARNING: You are using the -k
option, which is broken for this driver.");
}
upslogx(LOG_WARNING, "Shutting down for 10 minutes and hoping for the
best");
belkin_nut_write_int(REG_RESTARTTIMER, 10); /* 10 minutes */
belkin_nut_write_int(REG_SHUTDOWNTIMER, 1); /* 1 second */
}
The cleaned up version is a lot easier to source-read and I think it's more
robust too.
Jo Turner
-)O(-
-------------- next part --------------
A non-text attachment was scrubbed...
Na...
2005 Nov 08
0
gcc4 noise
...ction belkin_nut_read_str:
belkinunv.c:309: warning: pointer targets in passing argument 2 of ser_send_buf differ in signedness
belkinunv.c: In function belkin_nut_read_int:
belkinunv.c:350: warning: pointer targets in passing argument 2 of ser_send_buf differ in signedness
belkinunv.c: In function belkin_nut_write_int:
belkinunv.c:396: warning: pointer targets in passing argument 2 of ser_send_buf differ in signedness
belkinunv.c: In function belkin_std_receive:
belkinunv.c:571: warning: pointer targets in passing argument 2 of belkin_std_upsread differ in signedness
belkinunv.c:581: warning: pointer targets in...