Clean up compiler warnings
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
This commit is contained in:
parent
e96ef84b3e
commit
c8bb151bee
@ -68,14 +68,14 @@ do { \
|
||||
* * cnt ends up being the number of items in the list.
|
||||
*/
|
||||
#define list_for(list, curr, cnt) \
|
||||
if (((cnt=0) == 0) && (list != NULL) && (*list != NULL)) \
|
||||
if ((!(cnt=0)) && (*list != NULL)) \
|
||||
for (curr = *list; \
|
||||
(cnt == 0) || (curr != *list); \
|
||||
curr = (void*)le(curr)->le_next, \
|
||||
cnt++)
|
||||
|
||||
#define list_for_rev(list, curr, cnt) \
|
||||
if (((cnt=0) == 0) && list && *list) \
|
||||
if ((!(cnt=0)) && (*list != NULL)) \
|
||||
for (curr = (void *)(le(*list)->le_prev); \
|
||||
(cnt == 0) || ((void *)curr != le(*list)->le_prev); \
|
||||
curr = (void*)(le(curr)->le_prev), \
|
||||
|
@ -190,7 +190,7 @@ listener_config_multicast(config_object_t *config)
|
||||
{
|
||||
char val[4096];
|
||||
char inp[4096];
|
||||
const char *family;
|
||||
const char *family = "ipv4";
|
||||
struct in_addr sin;
|
||||
struct in6_addr sin6;
|
||||
int done = 0;
|
||||
|
@ -263,7 +263,6 @@ serial_dispatch(listener_context_t c, struct timeval *timeout)
|
||||
struct timeval tv;
|
||||
int max;
|
||||
int n, x, ret;
|
||||
char tmp_buf[32];
|
||||
|
||||
info = (serial_info *)c;
|
||||
VALIDATE(info);
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/poll.h>
|
||||
@ -234,7 +236,6 @@ domainStarted(virDomainPtr mojaDomain, const char *path, int mode)
|
||||
xmlDocPtr doc;
|
||||
xmlNodePtr cur, devices, child, serial;
|
||||
xmlAttrPtr attr, attr_mode, attr_path;
|
||||
size_t path_len = 0;
|
||||
|
||||
if (!mojaDomain)
|
||||
return -1;
|
||||
@ -243,9 +244,6 @@ domainStarted(virDomainPtr mojaDomain, const char *path, int mode)
|
||||
|
||||
xml = virDomainGetXMLDesc(mojaDomain, 0);
|
||||
// printf("%s\n", xml);
|
||||
if (path)
|
||||
path_len = strlen(path);
|
||||
|
||||
// @todo: free mojaDomain
|
||||
|
||||
// parseXML output
|
||||
|
Loading…
x
Reference in New Issue
Block a user