Nfc: fix incorrect type castings. Global: fix printf usage, types casting, overall cleanup. Drivers: incorrect array index in cc1101 driver. (#713)

* fix 'function cannot return qualified void/bool type'
* Fix variable 'consumed' is used uninitialized
* Fix format string is not a string literal (potentially insecure)
* Fix conflicting types for 'menu_item_get_type'
* Fix implicit conversion from enumeration type 'NfcDeviceType' to different enumeration type 'rfalNfcDevType'
* Fix hal_gpio_init incorrect arguments order
* Fix nfc->dev.dev_name condition will always evaluate to 'true'
* Fix explicitly assigning value of variable to itself
* Fix furi_hal_bt_wait_startup counter overflow
* Fix implicit conversion from 'StorageStatus' to 'SDError'
* Remove #include <sys/param.h>
* Add FIXME
* Fix syntax
* Fixup for 'furi_hal_bt_wait_startup counter overflow'
* nfc: fix different nfc device types
* Drivers: fix incorrect offset in cc1101_read_fifo
* Remove obsolete comment

Co-authored-by: Tony Freeman <tonyfreeman@users.noreply.github.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
tonyfreeman
2021-09-21 12:34:16 +03:00
committed by GitHub
parent 9b0aa0d6dc
commit 69f54973cc
63 changed files with 180 additions and 166 deletions

View File

@@ -6,7 +6,7 @@ void archive_scene_browser_callback(ArchiveBrowserEvent event, void* context) {
view_dispatcher_send_custom_event(archive->view_dispatcher, event);
}
const void archive_scene_browser_on_enter(void* context) {
void archive_scene_browser_on_enter(void* context) {
ArchiveApp* archive = (ArchiveApp*)context;
ArchiveMainView* main_view = archive->main_view;
@@ -15,9 +15,9 @@ const void archive_scene_browser_on_enter(void* context) {
view_dispatcher_switch_to_view(archive->view_dispatcher, ArchiveViewBrowser);
}
const bool archive_scene_browser_on_event(void* context, SceneManagerEvent event) {
bool archive_scene_browser_on_event(void* context, SceneManagerEvent event) {
ArchiveApp* archive = (ArchiveApp*)context;
bool consumed;
bool consumed = false;
if(event.type == SceneManagerEventTypeCustom) {
switch(event.event) {
@@ -37,6 +37,6 @@ const bool archive_scene_browser_on_event(void* context, SceneManagerEvent event
return consumed;
}
const void archive_scene_browser_on_exit(void* context) {
void archive_scene_browser_on_exit(void* context) {
// ArchiveApp* archive = (ArchiveApp*)context;
}

View File

@@ -9,7 +9,7 @@ void archive_scene_rename_text_input_callback(void* context) {
view_dispatcher_send_custom_event(archive->view_dispatcher, SCENE_RENAME_CUSTOM_EVENT);
}
const void archive_scene_rename_on_enter(void* context) {
void archive_scene_rename_on_enter(void* context) {
ArchiveApp* archive = (ArchiveApp*)context;
TextInput* text_input = archive->text_input;
@@ -31,7 +31,7 @@ const void archive_scene_rename_on_enter(void* context) {
view_dispatcher_switch_to_view(archive->view_dispatcher, ArchiveViewTextInput);
}
const bool archive_scene_rename_on_event(void* context, SceneManagerEvent event) {
bool archive_scene_rename_on_event(void* context, SceneManagerEvent event) {
ArchiveApp* archive = (ArchiveApp*)context;
bool consumed = false;
@@ -72,7 +72,7 @@ const bool archive_scene_rename_on_event(void* context, SceneManagerEvent event)
return consumed;
}
const void archive_scene_rename_on_exit(void* context) {
void archive_scene_rename_on_exit(void* context) {
ArchiveApp* archive = (ArchiveApp*)context;
// Clear view
text_input_set_header_text(archive->text_input, NULL);