Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix gcc warnings

  • Loading branch information...
commit 972ea41e2d350b091ad605660c2100ae05be5343 1 parent f54b212
@gajdusek gajdusek authored
View
2  src/linux_netlink.c
@@ -156,7 +156,6 @@ nl_connection_handler (GSocket *socket, GIOCondition condition, gpointer user_da
char buff[BUFF_SIZE];
size_t recv_len;
struct sockaddr_nl from_nla;
- socklen_t from_nla_len;
struct nlmsghdr *nlh;
struct sockaddr_nl kern_nla;
struct cn_msg *cn_hdr;
@@ -172,7 +171,6 @@ nl_connection_handler (GSocket *socket, GIOCondition condition, gpointer user_da
kern_nla.nl_pad = 0;
memset(buff, 0, sizeof(buff));
- from_nla_len = sizeof(from_nla);
memcpy(&from_nla, &kern_nla, sizeof(from_nla));
/* the helper process exited */
View
2  src/sysctl.c
@@ -66,6 +66,7 @@ enum {
#define IOPRIO_CLASS_SHIFT 13
+/* // test
static void ioprio_print(int pid)
{
int ioprio, ioclass;
@@ -83,6 +84,7 @@ static void ioprio_print(int pid)
printf("%s\n", to_prio[ioclass]);
}
}
+*/
int ioprio_getpid(pid_t pid, int *ioprio, int *ioclass) {
int rv = ioprio_get(IOPRIO_WHO_PROCESS, pid);
View
8 src/ulatencyd.c
@@ -373,7 +373,6 @@ gboolean g_spawn_sync ("/",
#ifdef ENABLE_DBUS
static int do_dbus_init() {
GError *error = NULL;
- DBusConnection *con;
#ifdef DEVELOP_DBUS_SESSION
char *env_uid;
uid_t target = 0;
@@ -406,9 +405,12 @@ static int do_dbus_init() {
g_error_free (error);
return FALSE;
}
- con = dbus_g_connection_get_connection(U_dbus_connection);
#ifndef DEVELOP_MODE
+ DBusConnection *con;
+ con = dbus_g_connection_get_connection(U_dbus_connection);
dbus_connection_set_exit_on_disconnect (con, FALSE);
+#else
+ dbus_g_connection_get_connection(U_dbus_connection);
#endif
return TRUE;
}
@@ -587,7 +589,7 @@ int main (int argc, char *argv[])
open_logfile(log_file);
}
- g_log(G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "");
+ g_log(G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, " ");
g_log(G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, "================= starting ulatencyd =================");
main_context = g_main_context_default();
View
4 tests/forkbomb.c
@@ -40,7 +40,7 @@ main (argc, argv)
int work = 0;
int rand = open("/dev/urandom",O_RDONLY);
int data[2];
- int tmpi;
+ int tmpi = 0;
pid_t pid;
@@ -131,7 +131,7 @@ main (argc, argv)
if(work) {
read(rand, &data, sizeof(int)*2);
if(data[1] != 0) {
- tmpi = data[0]/data[1];
+ tmpi += data[0]/data[1];
}
} else {
sleep(10000);
Please sign in to comment.
Something went wrong with that request. Please try again.