fix warnings

This commit is contained in:
lixianjing 2021-02-04 14:13:39 +08:00
parent 1ca179fdfd
commit 34ed165bbc
6 changed files with 13 additions and 16 deletions

View File

@ -396,7 +396,6 @@ static ret_t style_mutable_state_style_free(widget_state_style_t* witer) {
}
ret_t style_mutable_reset(style_t* s) {
style_item_t* iter = NULL;
widget_state_style_t* witer = NULL;
style_mutable_t* style = STYLE_MUTABLE(s);
return_value_if_fail(style != NULL, RET_BAD_PARAMS);

View File

@ -277,7 +277,6 @@ ret_t widget_get_window_theme(widget_t* widget, theme_t** win_theme, theme_t** d
}
bool_t widget_is_style_exist(widget_t* widget, const char* style_name, const char* state_name) {
value_t v;
const void* data = NULL;
const char* style = NULL;
const char* state = NULL;

View File

@ -352,7 +352,7 @@ ret_t text_selector_set_options(widget_t* widget, const char* options) {
if (nr < 3) {
tk_strncpy(format, "%d", sizeof(format) - 1);
} else {
const char* f = strchr(format, '-');
char* f = strchr(format, '-');
if (f != NULL) {
int p = f - format;
step = tk_atoi(f + 1);

View File

@ -71,7 +71,7 @@ static ret_t func_lshift(fscript_t* fscript, fscript_args_t* args, value_t* resu
}
}
return RET_OK;
return ret;
}
static ret_t func_rshift(fscript_t* fscript, fscript_args_t* args, value_t* result) {
@ -123,7 +123,7 @@ static ret_t func_rshift(fscript_t* fscript, fscript_args_t* args, value_t* resu
}
}
return RET_OK;
return ret;
}
static ret_t func_bit_set(fscript_t* fscript, fscript_args_t* args, value_t* result) {
@ -191,7 +191,7 @@ static ret_t func_bit_set(fscript_t* fscript, fscript_args_t* args, value_t* res
}
}
return RET_OK;
return ret;
}
static ret_t func_bit_clear(fscript_t* fscript, fscript_args_t* args, value_t* result) {
@ -259,7 +259,7 @@ static ret_t func_bit_clear(fscript_t* fscript, fscript_args_t* args, value_t* r
}
}
return RET_OK;
return ret;
}
static ret_t func_bit_toggle(fscript_t* fscript, fscript_args_t* args, value_t* result) {
@ -327,7 +327,7 @@ static ret_t func_bit_toggle(fscript_t* fscript, fscript_args_t* args, value_t*
}
}
return RET_OK;
return ret;
}
static ret_t func_bit_get(fscript_t* fscript, fscript_args_t* args, value_t* result) {
@ -395,7 +395,7 @@ static ret_t func_bit_get(fscript_t* fscript, fscript_args_t* args, value_t* res
}
}
return RET_OK;
return ret;
}
static ret_t func_bit_and(fscript_t* fscript, fscript_args_t* args, value_t* result) {

View File

@ -33,7 +33,7 @@ static ret_t func_wbuffer_attach(fscript_t* fscript, fscript_args_t* args, value
FSCRIPT_FUNC_CHECK(args->size >= 1, RET_BAD_PARAMS);
FSCRIPT_FUNC_CHECK(fargs_get_data_and_size(args, &data, &size) == RET_OK, RET_BAD_PARAMS);
value_set_object(result, object_wbuffer_create(data, size));
value_set_object(result, object_wbuffer_create((uint8_t*)data, size));
result->free_handle = TRUE;
return RET_OK;

View File

@ -19,12 +19,6 @@
*
*/
#include "tkc/mem.h"
#include "tkc/utils.h"
#include "tkc/object_default.h"
#include "network_interface.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
@ -35,6 +29,11 @@
#include <arpa/inet.h>
#include <net/if.h>
#include "tkc/mem.h"
#include "tkc/utils.h"
#include "tkc/object_default.h"
#include "hal/network_interface.h"
typedef struct _network_interface_linux_t {
network_interface_t network_interface;
char* ipaddr;