chg: remove gcc 7.0 warnings

This commit is contained in:
iceman1001 2018-01-26 20:17:56 +01:00
commit 374c1b16f6
2 changed files with 5 additions and 4 deletions

View file

@ -148,7 +148,7 @@ int CmdIOProxDemod(const char *Cmd) {
uint8_t facilitycode = bytebits_to_byte(bits+idx+18,8) ;
uint16_t number = (bytebits_to_byte(bits+idx+36,8)<<8)|(bytebits_to_byte(bits+idx+45,8)); //36,9
uint8_t crc = bytebits_to_byte(bits+idx+54,8);
uint16_t calccrc = 0;
uint8_t calccrc = 0;
for (uint8_t i = 1; i < 6; ++i){
calccrc += bytebits_to_byte(bits + idx + 9 * i ,8);

View file

@ -123,12 +123,13 @@ int CmdScriptRun(const char *Cmd) {
int name_len = 0;
int arg_len = 0;
sscanf(Cmd, "%127s%n %255[^\n\r]%n", script_name,&name_len, arguments, &arg_len);
sscanf(Cmd, "%127s%n %255[^\n\r]%n", script_name, &name_len, arguments, &arg_len);
char *suffix = "";
if (!endsWith(script_name,".lua"))
if (!endsWith(script_name, ".lua")) {
suffix = ".lua";
}
char script_path[strlen(get_my_executable_directory()) + strlen(LUA_SCRIPTS_DIRECTORY) + strlen(script_name) + strlen(suffix) + 1];
strcpy(script_path, get_my_executable_directory());
strcat(script_path, LUA_SCRIPTS_DIRECTORY);