summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-10-22 17:24:04 -0700
committerScott Shawcroft <scott@tannewt.org>2019-10-22 17:24:04 -0700
commitece8352126e34c5437080e9343f469f2f5e1bfe9 (patch)
tree45e56fd7802a6e2810ce5d02940c7ff7813cc05b /supervisor
parentaeee15eae8dc83f2947ac57ca868e439a15bf84b (diff)
Fix build by removing unused vars
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/shared/bluetooth.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/supervisor/shared/bluetooth.c b/supervisor/shared/bluetooth.c
index 64f3b55eb..02258de74 100644
--- a/supervisor/shared/bluetooth.c
+++ b/supervisor/shared/bluetooth.c
@@ -87,7 +87,7 @@ void supervisor_start_bluetooth(void) {
characteristic_list.items = characteristic_list_items;
mp_seq_clear(characteristic_list.items, 0, characteristic_list.alloc, sizeof(*characteristic_list.items));
- const uint32_t err_code = _common_hal_bleio_service_construct(&supervisor_ble_service, &supervisor_ble_service_uuid, false /* is secondary */, &characteristic_list);
+ _common_hal_bleio_service_construct(&supervisor_ble_service, &supervisor_ble_service_uuid, false /* is secondary */, &characteristic_list);
// File length
supervisor_ble_version_uuid.base.type = &bleio_uuid_type;
@@ -186,7 +186,7 @@ void open_current_file(void) {
path[length] = '\0';
FATFS *fs = &((fs_user_mount_t *) MP_STATE_VM(vfs_mount_table)->obj)->fatfs;
- FRESULT result = f_open(fs, &active_file, (char*) path, FA_READ | FA_WRITE);
+ f_open(fs, &active_file, (char*) path, FA_READ | FA_WRITE);
update_file_length();
}
@@ -246,7 +246,6 @@ void supervisor_bluetooth_background(void) {
//uint32_t data_shift_length = fileLength - offset - remove_length;
int32_t data_shift = insert_length - remove_length;
uint32_t new_length = file_length + data_shift;
- FRESULT result;
// TODO: Make these loops smarter to read and write on sector boundaries.
if (data_shift < 0) {
@@ -254,32 +253,32 @@ void supervisor_bluetooth_background(void) {
uint8_t data;
UINT actual;
f_lseek(&active_file, shift_offset - data_shift);
- result = f_read(&active_file, &data, 1, &actual);
+ f_read(&active_file, &data, 1, &actual);
f_lseek(&active_file, shift_offset);
- result = f_write(&active_file, &data, 1, &actual);
+ f_write(&active_file, &data, 1, &actual);
}
f_truncate(&active_file);
} else if (data_shift > 0) {
- result = f_lseek(&active_file, file_length);
+ f_lseek(&active_file, file_length);
// Fill end with 0xff so we don't need to erase.
uint8_t data = 0xff;
for (size_t i = 0; i < (size_t) data_shift; i++) {
UINT actual;
- result = f_write(&active_file, &data, 1, &actual);
+ f_write(&active_file, &data, 1, &actual);
}
for (uint32_t shift_offset = new_length - 1; shift_offset >= offset + insert_length ; shift_offset--) {
UINT actual;
f_lseek(&active_file, shift_offset - data_shift);
- result = f_read(&active_file, &data, 1, &actual);
+ f_read(&active_file, &data, 1, &actual);
f_lseek(&active_file, shift_offset);
- result = f_write(&active_file, &data, 1, &actual);
+ f_write(&active_file, &data, 1, &actual);
}
}
f_lseek(&active_file, offset);
uint8_t* data = (uint8_t *) (current_command + 4);
UINT written;
- result = f_write(&active_file, data, insert_length, &written);
+ f_write(&active_file, data, insert_length, &written);
f_sync(&active_file);
// Notify the new file length.
update_file_length();