WIDGET_BAR *Bar = W->data;
int row, col, len, res, max, val1, val2;
DIRECTION dir;
- STYLE style;
+#if 0
+ STYLE style; /* Fixme: unused variable */
+#endif
row = W->row;
col = W->col;
dir = Bar->direction;
- style = Bar->style;
+#if 0
+ style = Bar->style; /* Fixme: unused variable */
+#endif
len = Bar->length;
res = dir & (DIR_EAST | DIR_WEST) ? XRES : YRES;
static char Name[] = "EFN";
-char Host[256];
+char *Host;
int Port;
int DataSocket;
/*** hardware dependant functions ***/
/****************************************/
-static int drv_EFN_open(const char *section)
+static int drv_EFN_open(const char __attribute__ ((unused)) * section)
{
int sockfd_conf, portno_conf, n;
struct sockaddr_in serv_addr;
/* dummy function that sends something to the display */
static void drv_EFN_send(const char *data, const unsigned int len)
{
- int n, i;
+ int n;
- // transport command stirng to EUG 100
+ // transport command string to EUG 100
n = write(DataSocket, data, len);
if (n < 0) {
error("%s:drv_EFN_send: Failed to write to data socket\n", Name);
- // return(-1);
}
- /*
- printf("EFN_send: ");
- for(i=0;i<n;i++)
- {
- printf("0x%02x ",data[i]);
- }
- printf("\n");
- */
}
}
}
-static void drv_EFN_defchar(const int ascii, const unsigned char *matrix)
+static void drv_EFN_defchar(const int __attribute__ ((unused)) ascii, const unsigned char
+ __attribute__ ((unused)) * matrix)
{
error("%s:drv_EFN_defchar: Function not supported by EFN modules\n", Name);
}
int rows = -1, cols = -1;
char *s;
- s = cfg_get(section, "Host", NULL);
+ Host = cfg_get(section, "Host", NULL);
- if (s == NULL || *s == '\0') {
+ if (Host == NULL || *Host == '\0') {
error("%s: no '%s.Host' entry from %s", Name, section, cfg_source());
return -1;
}
- if (sscanf(s, "%s", &Host) != 1) {
- error("%s: bad %s.Size '%s' from %s", Name, section, s, cfg_source());
- free(s);
- return -1;
- }
-
if (cfg_number(section, "Port", 1000, 0, 65535, &Port) < 0)
return -1;
drv_FW8888_send_cmd(0x01);
}
-static void drv_FW8888_home(void)
+static void __attribute__ ((unused)) drv_FW8888_home(void)
{
drv_FW8888_send_cmd(0x02);
}
-static void drv_FW8888_display_off(void)
+static void __attribute__ ((unused)) drv_FW8888_display_off(void)
{
drv_FW8888_send_cmd(0x08);
}
-static void drv_FW8888_display_on_cursor_off(void)
+static void __attribute__ ((unused)) drv_FW8888_display_on_cursor_off(void)
{
drv_FW8888_send_cmd(0x0C);
}
-static void drv_FW8888_display_on_cursor_on(void)
+static void __attribute__ ((unused)) drv_FW8888_display_on_cursor_on(void)
{
drv_FW8888_send_cmd(0x0E);
}
-static void drv_FW8888_backlight_off(void)
+static void __attribute__ ((unused)) drv_FW8888_backlight_off(void)
{
drv_FW8888_send_cmd(0x38);
}
-static void drv_FW8888_backlight_on(void)
+static void __attribute__ ((unused)) drv_FW8888_backlight_on(void)
{
drv_FW8888_send_cmd(0x39);
}
{
int i, j, k;
unsigned char *output = malloc(DCOLS * DROWS * sizeof(unsigned char));
- int retval;
DEBUG("entered");
if (!output)
DEBUG("output array prepared");
mutex_lock(kb_mutex);
- retval = usb_interrupt_write(g15_lcd, usb_endpoint, (char *) output, 992, 1000);
- //info("%s: Ret %i from usb_interrupt_write(endpoint %d)", Name, retval, usb_endpoint);
+ i = usb_interrupt_write(g15_lcd, usb_endpoint, (char *) output, 992, 1000);
+ //info("%s: Ret %i from usb_interrupt_write(endpoint %d)", Name, i, usb_endpoint);
mutex_unlock(kb_mutex);
usleep(300);
static void drv_MOGX_send(const unsigned char *data, const unsigned int size)
{
- int ret;
+ int __attribute__ ((unused)) ret;
//unsigned char rcv_buffer[64] = "";
static int drv_PICGraphic_GPO(const int num, const int val)
{
- char cmd[3];
+ char __attribute__ ((unused)) cmd[3];
cmd[0] = 'g';
cmd[1] = val ? 's' : 'c';
cmd[2] = num;
// todo: fixme
-// drv_PICGraphic_send(cmd, 3);
+ // drv_PICGraphic_send(cmd, 3);
return 0;
}
static int drv_PICGraphic_GPI(const int num)
{
- char cmd[3];
+ char __attribute__ ((unused)) cmd[3];
int ret = 0;
cmd[0] = 'g';
cmd[2] = num;
// todo: fixme
-// drv_PICGraphic_send(cmd, 3);
-// ret = drv_generic_serial_read(cmd, 1);
+ // drv_PICGraphic_send(cmd, 3);
+ // ret = drv_generic_serial_read(cmd, 1);
if (ret)
return -1;
/* example function used in a plugin */
static int drv_PICGraphic_contrast(int contrast)
{
- char cmd[2];
+ char __attribute__ ((unused)) cmd[2];
/* adjust limits according to the display */
if (contrast < 0)
cmd[0] = 'c';
cmd[1] = contrast;
// todo: fixme
-// drv_PICGraphic_send(cmd, 2);
+ // drv_PICGraphic_send(cmd, 2);
return contrast;
}
static void drv_pLG_send(unsigned char *data, int size)
{
- int ret;
+ int __attribute__ ((unused)) ret;
ret = usb_interrupt_write(lcd, USB_ENDPOINT_OUT + 1, (char *) data, size, 1000);
//fprintf(stderr, "%s written %d bytes\n", __FUNCTION__, ret);
}
static NODE *Level11(void)
{
NODE *Root;
- TOKEN sign = T_UNDEF;
+ OPERATOR sign = O_UNDEF;
if (Token == T_OPERATOR && (Operator == O_ADD || Operator == O_SUB || Operator == O_NOT)) {
sign = Operator;
{
FILE *infile;
int skipline = 0; // Skip the first in the file, it throws off the detection
- char line[100], *SipLoc, Channel[25], Location[25], State[9], Application[25], EndPoint[8], Ret[50];
+ char line[100], *SipLoc, Channel[25], Location[25], __attribute__ ((unused)) State[9], Application[25], EndPoint[8],
+ Ret[50];
int i = 0, ChannelInt = 0, ZapLine = 0;
struct Line Lines[32]; // Setup 32 lines, ZAP 1-32 (memory is cheap)
static HASH CPUinfo;
static FILE *stream = NULL;
-static int parse_cpuinfo(char *oid)
+static int parse_cpuinfo(char __attribute__ ((unused)) * oid)
{
int age;
hash_put(&CPUinfo, key, val);
}
- /* to avoid compiler unused warning */
- oid = 0;
#else
static int huawei_configured(void)
{
- int port_exists, ret, bytes;
+ int port_exists, ret;
static int connected = -1, configured = 0;
char *buf;
/* modem initialization */
if (connected == 1 && configured != 1) {
buf = huawei_send_receive(INIT_STRING);
- bytes = strlen(buf);
if (strncmp(buf, "OK", 2) == 0) {
configured = 1;
static void huawei_read_quality(const char *cmd)
{
- int bytes;
char *buf;
buf = huawei_send_receive(cmd);
- bytes = strlen(buf);
if (strncmp(buf, "+CSQ: ", 6) == 0) {
static void huawei_read_sysinfo(const char *cmd)
{
- int bytes;
char *buf;
buf = huawei_send_receive(cmd);
- bytes = strlen(buf);
if (strncmp(buf, "^SYSINFO:", 9) == 0) {
static void huawei_read_flowreport(const char *cmd)
{
char *buf;
- int bytes;
static unsigned long long int prev_tx_flow = 0, prev_rx_flow = 0;
static unsigned long int prev_ds_time = 0;
buf = huawei_send_receive(cmd);
- bytes = strlen(buf);
if (strncmp(buf, "^DSFLOWQRY:", 11) == 0) {
char key_buffer[32];
char buffer[64];
int age;
- int has_sens = 0;
+ int __attribute__ ((unused)) has_sens = 0;
int has_range = 0;
qprintf(key_buffer, sizeof(key_buffer), "%s.%s", dev, key);
int age;
int has_key = 0;
int key_flags = 0;
- int key_size = 0;
+ int __attribute__ ((unused)) key_size = 0;
qprintf(key_buffer, sizeof(key_buffer), "%s.%s", dev, key);
age = hash_age(&wireless, key);
int thread_create(const char *name, void (*thread) (void *data), void *data)
{
- pid_t pid, ppid;
-
- ppid = getpid();
+ pid_t pid;
switch (pid = fork()) {
case -1: