Skip to content

Commit

Permalink
only fixing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Nov 21, 2023
1 parent d539d2c commit 801959d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/cmnds/cmd_eventHandlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ void EventHandlers_FireEvent2(byte eventCode, int argument, int argument2) {
ev = ev->next;
}
}

void CMD_Script_ProcessWaitersForEvent(byte eventCode, int argument);

void EventHandlers_FireEvent(byte eventCode, int argument) {
struct eventHandler_s *ev;

Expand Down
3 changes: 2 additions & 1 deletion src/cmnds/cmd_simulatorOnly.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ void CMD_InitSimulatorOnlyCommands() {
CMD_RegisterCommand("ExitSimulator", CMD_ExitSimulator, NULL);
}

#endif WINDOWS
#endif


2 changes: 1 addition & 1 deletion src/cmnds/cmd_tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define MAX_ARGS 32

static char g_buffer[MAX_CMD_LEN];
static const char *g_args[MAX_ARGS];
static char *g_args[MAX_ARGS];
static char g_argsExpanded[MAX_ARGS][40];
static const char *g_argsFrom[MAX_ARGS];
static int g_numArgs = 0;
Expand Down
1 change: 1 addition & 0 deletions src/driver/drv_ntp.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ int NTP_RemoveClockEvent(int id);
int NTP_ClearEvents();
void NTP_Init_Events();
int NTP_ClearEvents();
void NTP_RunEvents(unsigned int newTime, bool bTimeValid);

extern unsigned int g_ntpTime;

Expand Down
6 changes: 2 additions & 4 deletions src/driver/drv_spi_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void spi_test_erase() {
// THIS WILL TAKE TIME! YOU will have to wait (and check status register to see if it's ready)

}
void spi_test_write(int adr, byte *data, int cnt) {
void spi_test_write(int adr, const byte *data, int cnt) {
int i;
softSPI_t spi;

Expand Down Expand Up @@ -158,8 +158,6 @@ void spi_test_write(int adr, byte *data, int cnt) {
SPI_End(&spi); // disable SPI communication with the flash

OBK_ENABLE_INTERRUPTS;
free(data);

}
// SPITestFlash_ReadData 0 16
static commandResult_t CMD_SPITestFlash_ReadData(const void* context, const char* cmd, const char* args, int cmdFlags) {
Expand Down Expand Up @@ -205,7 +203,7 @@ static commandResult_t CMD_SPITestFlash_WriteStr(const void* context, const char
}
}

spi_test_write(addr, str, strlen(str));
spi_test_write(addr, (const byte*)str, strlen(str));

return CMD_RES_OK;
}
Expand Down
2 changes: 0 additions & 2 deletions src/httpserver/hass.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,6 @@ HassDeviceInfo* hass_init_light_singleColor_onChannels(int toggle, int dimmer, i
/// @param channel
/// @return
HassDeviceInfo* hass_init_sensor_device_info(ENTITY_TYPE type, int channel, int decPlaces, int decOffset, int divider) {
int i;

//Assuming that there is only one DHT setup per device which keeps uniqueid/names simpler
HassDeviceInfo* info = hass_init_device_info(type, channel, NULL, NULL); //using channel as index to generate uniqueId

Expand Down

0 comments on commit 801959d

Please sign in to comment.