Move common helpers to common.h to fix compilation warnings

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
Ikey Doherty
2017-10-10 22:07:02 +01:00
parent 3684dfe11e
commit fd252e265d
3 changed files with 39 additions and 11 deletions
+35
View File
@@ -0,0 +1,35 @@
/*
* This file is part of linux-steam-integration.
*
* Copyright © 2016-2017 Ikey Doherty
*
* linux-steam-integration is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*/
#pragma once
#define _GNU_SOURCE
/* Mark a variable/argument as unused to skip warnings */
#define __lsi_unused__ __attribute__((unused))
/* Force inlining of a function */
#define __lsi_inline__ __attribute__((always_inline))
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 8
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=8 tabstop=8 expandtab:
* :indentSize=8:tabSize=8:noTabs=true:
*/
+3 -3
View File
@@ -11,13 +11,13 @@
#define _GNU_SOURCE
#include "../shim/lsi.h"
#include "nica/nica.h"
#include <link.h>
#include <stdio.h>
#include <stdlib.h>
#include "../common.h"
#include "nica/nica.h"
/**
* Is this a process we're actually interested in?
*/
+1 -8
View File
@@ -20,16 +20,9 @@
#include <sys/stat.h>
#include <unistd.h>
#include "../common.h"
#include "config.h"
/* Mark a variable/argument as unused to skip warnings */
#define __lsi_unused__ __attribute__((unused))
/* Force inlining of a function */
#define __lsi_inline__ __attribute__((always_inline))
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
/**
* Current Linux Steam Integration settings.
*/