chore(radio): Fix some compiler warnings when building firmware (#4058)
This commit is contained in:
@@ -286,7 +286,7 @@ class SensorButton : public Button {
|
||||
setNumIdState();
|
||||
|
||||
strAppend(s, g_model.telemetrySensors[index].label, TELEM_LABEL_LEN);
|
||||
auto lbl = tsStyle.newName(lvobj, s);
|
||||
tsStyle.newName(lvobj, s);
|
||||
|
||||
box = tsStyle.newFreshCont(lvobj);
|
||||
fresh = tsStyle.newFreshIcon(box);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
static const uint8_t _trimMap[MAX_TRIMS * 2] = {6, 7, 4, 5, 2, 3, 0, 1, 8, 9, 10, 11};
|
||||
|
||||
#if !defined(PCBNV14)
|
||||
static EnumKeys get_ith_key(uint8_t i)
|
||||
{
|
||||
auto supported_keys = keysGetSupported();
|
||||
@@ -40,6 +41,7 @@ static EnumKeys get_ith_key(uint8_t i)
|
||||
// we assume: i < keysGetMaxKeys()
|
||||
return (EnumKeys)0;
|
||||
}
|
||||
#endif
|
||||
|
||||
class RadioKeyDiagsWindow : public Window
|
||||
{
|
||||
|
||||
@@ -500,11 +500,11 @@ void RadioSdManagerPage::fileAction(const char* path, const char* name,
|
||||
if (clipboard.type == CLIPBOARD_TYPE_SD_FILE) {
|
||||
menu->addLine(STR_PASTE, [=]() {
|
||||
static char lfn[FF_MAX_LFN + 1]; // TODO optimize that!
|
||||
char destFileName[2 * CLIPBOARD_PATH_LEN + 1];
|
||||
f_getcwd((TCHAR*)lfn, FF_MAX_LFN);
|
||||
// prevent copying to the same directory with the same name
|
||||
char* destNamePtr = clipboard.data.sd.filename;
|
||||
if (!strcmp(clipboard.data.sd.directory, lfn)) {
|
||||
char destFileName[2 * CLIPBOARD_PATH_LEN + 1];
|
||||
destNamePtr =
|
||||
strAppend(destFileName, FILE_COPY_PREFIX, CLIPBOARD_PATH_LEN);
|
||||
destNamePtr = strAppend(destNamePtr, clipboard.data.sd.filename,
|
||||
|
||||
@@ -213,8 +213,6 @@ void ViewTextWindow::onEvent(event_t event)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void checkbox_event_handler(lv_event_t* e);
|
||||
|
||||
class ViewChecklistWindow : public ViewTextWindow
|
||||
{
|
||||
public:
|
||||
@@ -321,7 +319,7 @@ class ViewChecklistWindow : public ViewTextWindow
|
||||
|
||||
size_t cur = 0;
|
||||
|
||||
for(int i=0; i<bufSize; ++i)
|
||||
for(size_t i=0; i<bufSize; ++i)
|
||||
{
|
||||
if (buffer[i] == '\n' || buffer[i] == '\r') {
|
||||
buffer[i] = 0;
|
||||
|
||||
@@ -135,6 +135,7 @@ void onSdManagerMenu(const char * result)
|
||||
strncpy(clipboard.data.sd.filename, line, CLIPBOARD_PATH_LEN-1);
|
||||
}
|
||||
else if (result == STR_PASTE) {
|
||||
char destFileName[2 * CLIPBOARD_PATH_LEN + 1];
|
||||
f_getcwd(lfn, FF_MAX_LFN);
|
||||
// if destination is dir, copy into that dir
|
||||
if (IS_DIRECTORY(line)) {
|
||||
@@ -144,7 +145,6 @@ void onSdManagerMenu(const char * result)
|
||||
char *destNamePtr = clipboard.data.sd.filename;
|
||||
if (!strcmp(clipboard.data.sd.directory, lfn)) {
|
||||
// prevent copying to the same directory under the same name
|
||||
char destFileName[2 * CLIPBOARD_PATH_LEN + 1];
|
||||
destNamePtr =
|
||||
strAppend(destFileName, FILE_COPY_PREFIX, CLIPBOARD_PATH_LEN);
|
||||
destNamePtr = strAppend(destNamePtr, clipboard.data.sd.filename,
|
||||
|
||||
Reference in New Issue
Block a user