forked from enlightenment/enlightenment
Add UNUSED where needed.
Fix formatting. SVN revision: 51405
This commit is contained in:
parent
2547aeefe2
commit
2cd2f124dd
|
@ -170,7 +170,7 @@ _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
|
||||
static Evas_Object *
|
||||
_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Evas_Object *otb, *ol, *ow;
|
||||
E_Radio_Group *rg;
|
||||
|
@ -255,7 +255,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
|
||||
static int
|
||||
_basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||
_basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
cfdata->inst->poll_interval = cfdata->poll.interval;
|
||||
cfdata->inst->units = cfdata->unit_method;
|
||||
|
|
|
@ -157,20 +157,20 @@ _gc_shutdown(E_Gadcon_Client *gcc)
|
|||
}
|
||||
|
||||
static void
|
||||
_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient)
|
||||
_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient __UNUSED__)
|
||||
{
|
||||
e_gadcon_client_aspect_set(gcc, 16, 16);
|
||||
e_gadcon_client_min_size_set(gcc, 16, 16);
|
||||
}
|
||||
|
||||
static char *
|
||||
_gc_label(E_Gadcon_Client_Class *client_class)
|
||||
_gc_label(E_Gadcon_Client_Class *client_class __UNUSED__)
|
||||
{
|
||||
return _("Temperature");
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_gc_icon(E_Gadcon_Client_Class *client_class, Evas *evas)
|
||||
_gc_icon(E_Gadcon_Client_Class *client_class __UNUSED__, Evas *evas)
|
||||
{
|
||||
Evas_Object *o;
|
||||
char buf[PATH_MAX];
|
||||
|
@ -183,7 +183,7 @@ _gc_icon(E_Gadcon_Client_Class *client_class, Evas *evas)
|
|||
}
|
||||
|
||||
static const char *
|
||||
_gc_id_new(E_Gadcon_Client_Class *client_class)
|
||||
_gc_id_new(E_Gadcon_Client_Class *client_class __UNUSED__)
|
||||
{
|
||||
Config_Face *inst;
|
||||
char id[128];
|
||||
|
@ -208,7 +208,7 @@ _gc_id_new(E_Gadcon_Client_Class *client_class)
|
|||
}
|
||||
|
||||
static void
|
||||
_temperature_face_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||
_temperature_face_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
Config_Face *inst;
|
||||
Evas_Event_Mouse_Down *ev;
|
||||
|
@ -242,7 +242,7 @@ _temperature_face_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *eve
|
|||
}
|
||||
|
||||
static void
|
||||
_temperature_face_cb_post_menu(void *data, E_Menu *m)
|
||||
_temperature_face_cb_post_menu(void *data, E_Menu *m __UNUSED__)
|
||||
{
|
||||
Config_Face *inst;
|
||||
|
||||
|
@ -264,7 +264,7 @@ _temperature_face_level_set(Config_Face *inst, double level)
|
|||
}
|
||||
|
||||
static void
|
||||
_temperature_face_cb_menu_configure(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||
_temperature_face_cb_menu_configure(void *data, E_Menu *m __UNUSED__, E_Menu_Item *mi __UNUSED__)
|
||||
{
|
||||
Config_Face *inst;
|
||||
|
||||
|
@ -464,7 +464,7 @@ e_modapi_init(E_Module *m)
|
|||
}
|
||||
|
||||
EAPI int
|
||||
e_modapi_shutdown(E_Module *m)
|
||||
e_modapi_shutdown(E_Module *m __UNUSED__)
|
||||
{
|
||||
e_gadcon_provider_unregister(&_gadcon_class);
|
||||
eina_hash_foreach(temperature_config->faces, _temperature_face_shutdown, NULL);
|
||||
|
@ -477,7 +477,7 @@ e_modapi_shutdown(E_Module *m)
|
|||
}
|
||||
|
||||
EAPI int
|
||||
e_modapi_save(E_Module *m)
|
||||
e_modapi_save(E_Module *m __UNUSED__)
|
||||
{
|
||||
e_config_domain_save("module.temperature", conf_edd, temperature_config);
|
||||
return 1;
|
||||
|
|
|
@ -12,7 +12,7 @@ void
|
|||
temperature_udev_update(void *data)
|
||||
{
|
||||
Config_Face *inst;
|
||||
Eina_List *l, *l2;
|
||||
Eina_List *l;
|
||||
double cur, temp, cpus = 0;
|
||||
char *syspath;
|
||||
const char *test;
|
||||
|
@ -23,7 +23,7 @@ temperature_udev_update(void *data)
|
|||
temp = -999;
|
||||
|
||||
if (!inst->tempdevs)
|
||||
inst->tempdevs = eeze_udev_find_by_type(EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR, NULL);
|
||||
inst->tempdevs = eeze_udev_find_by_type(EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR, NULL);
|
||||
if (eina_list_count(inst->tempdevs))
|
||||
{
|
||||
temp = 0;
|
||||
|
@ -31,8 +31,7 @@ temperature_udev_update(void *data)
|
|||
{
|
||||
for (x = 1, y = 0;x < 15;x++)
|
||||
{
|
||||
if (y >= 2)
|
||||
break;
|
||||
if (y >= 2) break;
|
||||
sprintf(buf, "temp%d_input", x);
|
||||
if ((test = eeze_udev_syspath_get_sysattr(syspath, buf)))
|
||||
{
|
||||
|
@ -53,7 +52,7 @@ temperature_udev_update(void *data)
|
|||
if (temp != -999)
|
||||
{
|
||||
if (inst->units == FAHRENHEIT)
|
||||
temp = (temp * 9.0 / 5.0) + 32;
|
||||
temp = (temp * 9.0 / 5.0) + 32;
|
||||
|
||||
if (!inst->have_temp)
|
||||
{
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include <limits.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#include <Ecore.h>
|
||||
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include "e_mod_main_private.h"
|
||||
|
||||
|
||||
static int sensor_type = SENSOR_TYPE_NONE;
|
||||
static char *sensor_name = NULL;
|
||||
static int poll_interval = 32;
|
||||
|
@ -41,33 +40,33 @@ temperature_get_bus_files(const char* bus)
|
|||
|
||||
result = NULL;
|
||||
|
||||
snprintf(busdir, sizeof(busdir), "/sys/bus/%s/devices", bus);
|
||||
/* Look through all the devices for the given bus. */
|
||||
therms = ecore_file_ls(busdir);
|
||||
snprintf(busdir, sizeof(busdir), "/sys/bus/%s/devices", bus);
|
||||
/* Look through all the devices for the given bus. */
|
||||
therms = ecore_file_ls(busdir);
|
||||
|
||||
EINA_LIST_FREE(therms, name)
|
||||
{
|
||||
Eina_List *files;
|
||||
char *file;
|
||||
{
|
||||
Eina_List *files;
|
||||
char *file;
|
||||
|
||||
/* Search each device for temp*_input, these should be
|
||||
* temperature devices. */
|
||||
snprintf(path, sizeof(path),"%s/%s", busdir, name);
|
||||
files = ecore_file_ls(path);
|
||||
EINA_LIST_FREE(files, file)
|
||||
{
|
||||
if ((!strncmp("temp", file, 4)) &&
|
||||
(!strcmp("_input", &file[strlen(file) - 6])))
|
||||
{
|
||||
char *f;
|
||||
/* Search each device for temp*_input, these should be
|
||||
* temperature devices. */
|
||||
snprintf(path, sizeof(path),"%s/%s", busdir, name);
|
||||
files = ecore_file_ls(path);
|
||||
EINA_LIST_FREE(files, file)
|
||||
{
|
||||
if ((!strncmp("temp", file, 4)) &&
|
||||
(!strcmp("_input", &file[strlen(file) - 6])))
|
||||
{
|
||||
char *f;
|
||||
|
||||
snprintf(path, sizeof(path),
|
||||
"%s/%s/%s", busdir, name, file);
|
||||
f = strdup(path);
|
||||
if (f) result = eina_list_append(result, f);
|
||||
}
|
||||
free(file);
|
||||
}
|
||||
snprintf(path, sizeof(path),
|
||||
"%s/%s/%s", busdir, name, file);
|
||||
f = strdup(path);
|
||||
if (f) result = eina_list_append(result, f);
|
||||
}
|
||||
free(file);
|
||||
}
|
||||
free(name);
|
||||
}
|
||||
return result;
|
||||
|
@ -222,16 +221,16 @@ init(void)
|
|||
therms = ecore_file_ls("/sys/bus/i2c/devices");
|
||||
|
||||
EINA_LIST_FREE(therms, name)
|
||||
{
|
||||
snprintf(path, sizeof(path),
|
||||
"/sys/bus/i2c/devices/%s/%s_input",
|
||||
name, sensor_name);
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
sensor_path = strdup(path);
|
||||
{
|
||||
snprintf(path, sizeof(path),
|
||||
"/sys/bus/i2c/devices/%s/%s_input",
|
||||
name, sensor_name);
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
sensor_path = strdup(path);
|
||||
/* We really only care about the first
|
||||
* one for the default. */
|
||||
break;
|
||||
break;
|
||||
}
|
||||
free(name);
|
||||
}
|
||||
|
@ -240,16 +239,16 @@ init(void)
|
|||
therms = ecore_file_ls("/sys/bus/pci/devices");
|
||||
|
||||
EINA_LIST_FREE(therms, name)
|
||||
{
|
||||
snprintf(path, sizeof(path),
|
||||
"/sys/bus/pci/devices/%s/%s_input",
|
||||
name, sensor_name);
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
sensor_path = strdup(path);
|
||||
{
|
||||
snprintf(path, sizeof(path),
|
||||
"/sys/bus/pci/devices/%s/%s_input",
|
||||
name, sensor_name);
|
||||
if (ecore_file_exists(path))
|
||||
{
|
||||
sensor_path = strdup(path);
|
||||
/* We really only care about the first
|
||||
* one for the default. */
|
||||
break;
|
||||
break;
|
||||
}
|
||||
free(name);
|
||||
}
|
||||
|
@ -398,7 +397,7 @@ check(void)
|
|||
if (ret) return temp;
|
||||
|
||||
return -999;
|
||||
error:
|
||||
error:
|
||||
sensor_type = SENSOR_TYPE_NONE;
|
||||
if (sensor_name) free(sensor_name);
|
||||
sensor_name = NULL;
|
||||
|
@ -410,8 +409,7 @@ check(void)
|
|||
static Eina_Bool
|
||||
poll_cb(void *data)
|
||||
{
|
||||
int t;
|
||||
int pp;
|
||||
int t, pp;
|
||||
|
||||
t = check();
|
||||
pp = cur_poll_interval;
|
||||
|
|
Loading…
Reference in New Issue