App warnings fixed. (#1118)

This commit is contained in:
masj-mobica
2024-03-09 08:02:26 +01:00
committed by GitHub
parent f72d3c833c
commit bc124fc873
6 changed files with 6 additions and 10 deletions

View File

@ -136,7 +136,8 @@ commandResult_t SM16703P_CMD_setRaw(const void *context, const char *cmd, const
return CMD_RES_OK;
}
commandResult_t SM16703P_CMD_setPixel(const void *context, const char *cmd, const char *args, int flags) {
int pixel, i, r, g, b;
int i, r, g, b;
int pixel = 0;
const char *all = 0;
Tokenizer_TokenizeString(args, 0);

View File

@ -939,8 +939,6 @@ commandResult_t TuyaMCU_SendQueryState(const void* context, const char* cmd, con
}
void TuyaMCU_SendStateRawFromString(int dpId, const char *args) {
const char *stop;
float val;
int cur = 0;
byte buffer[64];

View File

@ -202,11 +202,6 @@ void UART_SendByte(byte b) {
#endif
}
commandResult_t CMD_UART_Send_Hex(const void *context, const char *cmd, const char *args, int cmdFlags) {
byte b;
float val;
const char *stop;
//const char *args = CMD_GetArg(1);
if (!(*args)) {
addLogAdv(LOG_INFO, LOG_FEATURE_TUYAMCU, "CMD_UART_Send_Hex: requires 1 argument (hex string, like FFAABB00CCDD\n");
return CMD_RES_NOT_ENOUGH_ARGUMENTS;

View File

@ -1026,7 +1026,7 @@ int JSON_ProcessCommandReply(const char* cmd, const char* arg, void* request, js
#if ENABLE_DRIVER_TUYAMCU
else if (!wal_strnicmp(cmd, "Dp", 2)) {
int id = -1;
if (isdigit(cmd[2])) {
if (isdigit((int)cmd[2])) {
sscanf(cmd + 2, "%i", &id);
}
http_obk_json_dps(id,request, printer);

View File

@ -558,7 +558,8 @@ int CFG_GetFlags() {
return g_cfg.genericFlags;
}
unsigned long CFG_GetFlags64() {
return *((unsigned long*)&g_cfg.genericFlags);
unsigned long* pAllGenericFlags = (unsigned long*)&g_cfg.genericFlags;
return *pAllGenericFlags;
}
bool CFG_HasFlag(int flag) {
if (flag >= 32) {

View File

@ -189,6 +189,7 @@ void PINS_BeginDeepSleepWithPinWakeUp() {
extern void deep_sleep_wakeup_with_gpio(UINT32 gpio_index_map, UINT32 gpio_edge_map);
deep_sleep_wakeup_with_gpio(g_gpio_index_map[0], g_gpio_edge_map[0]);
#else
extern void bk_enter_deep_sleep(UINT32 g_gpio_index_map, UINT32 g_gpio_edge_map);
bk_enter_deep_sleep(g_gpio_index_map[0], g_gpio_edge_map[0]);
#endif
#else