build: reformat sources to clang-format-19
What changed, and why it matters
This commit is purely a code reformatting pass using clang-format-19. It adjusts whitespace, pointer-asterisk placement, and braced-initializer indentation across eight source files. There are no functional changes, no bug fixes, and no security-related alterations.
No security action needed. Treat as a normal formatting/style commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff shows only stylistic changes produced by clang-format-19: } * becomes }* for opaque handle typedefs, an empty function body gains a space before braces, #pragma mark comments get a space after //, and designated-initializer blocks are re-indented. No logic, control flow, data types, or API behavior is modified.
Changed components
libjade/include/freertos/ringbuf.hlibjade/include/freertos/semphr.hlibjade/include/nvs_flash.hlibjade/libjade.cmain/display_hw.cmain/qrcode.cmain/ui/dashboard.cmain/ui/dialogs.cInspect captured patch +28 / −29
diff --git a/libjade/include/freertos/ringbuf.h b/libjade/include/freertos/ringbuf.h
index ce18562..c68ce90 100644
--- a/libjade/include/freertos/ringbuf.h
+++ b/libjade/include/freertos/ringbuf.h
@@ -9,7 +9,7 @@
typedef struct Ringbuffer {
struct wally_map m;
pthread_mutex_t mutex; // We should use a semaphore to wake at some point
-} * RingbufHandle_t;
+}* RingbufHandle_t;
typedef struct Ringbuffer StaticRingbuffer_t;
diff --git a/libjade/include/freertos/semphr.h b/libjade/include/freertos/semphr.h
index 66d08e3..6d08bd4 100644
--- a/libjade/include/freertos/semphr.h
+++ b/libjade/include/freertos/semphr.h
@@ -7,7 +7,7 @@
typedef struct Semaphore {
pthread_mutex_t mutex;
-} * SemaphoreHandle_t;
+}* SemaphoreHandle_t;
static inline SemaphoreHandle_t xSemaphoreCreateMutex(void)
{
diff --git a/libjade/include/nvs_flash.h b/libjade/include/nvs_flash.h
index 27a6414..30695a5 100644
--- a/libjade/include/nvs_flash.h
+++ b/libjade/include/nvs_flash.h
@@ -13,7 +13,7 @@ typedef nvs_handle_t nvs_handle;
typedef struct nvs_iterator {
struct wally_map* m;
size_t idx;
-} * nvs_iterator_t;
+}* nvs_iterator_t;
#define NVS_DEFAULT_PART_NAME ""
diff --git a/libjade/libjade.c b/libjade/libjade.c
index db1d923..1acbcf1 100644
--- a/libjade/libjade.c
+++ b/libjade/libjade.c
@@ -104,7 +104,7 @@ const char* locale_lang_with_fallback(const locale_multilang_string_t* str, jloc
// main/idletimer.c
void idletimer_init(void) {}
bool idletimer_register_activity(const bool is_ui) { return true; }
-void idletimer_set_min_timeout_secs(uint16_t min_timeout_secs){};
+void idletimer_set_min_timeout_secs(uint16_t min_timeout_secs) {};
// main/logging.c
#ifndef CONFIG_LOG_DEFAULT_LEVEL_NONE
diff --git a/main/display_hw.c b/main/display_hw.c
index 7671913..83a91cb 100644
--- a/main/display_hw.c
+++ b/main/display_hw.c
@@ -154,18 +154,18 @@ static void esp_lcd_init(void* _ignored)
ESP_ERROR_CHECK(spi_bus_initialize(CONFIG_DISPLAY_SPI_HOST, &buscfg, SPI_DMA_CH_AUTO));
- esp_lcd_panel_io_spi_config_t io_config
- = {.dc_gpio_num = CONFIG_DISPLAY_PIN_DC,
- .cs_gpio_num = CONFIG_DISPLAY_PIN_CS,
- .pclk_hz = CONFIG_DISPLAY_SPI_CLOCK,
- .lcd_cmd_bits = 8,
- .lcd_param_bits = 8,
- .spi_mode = 0,
+ esp_lcd_panel_io_spi_config_t io_config = {
+ .dc_gpio_num = CONFIG_DISPLAY_PIN_DC,
+ .cs_gpio_num = CONFIG_DISPLAY_PIN_CS,
+ .pclk_hz = CONFIG_DISPLAY_SPI_CLOCK,
+ .lcd_cmd_bits = 8,
+ .lcd_param_bits = 8,
+ .spi_mode = 0,
#if defined(CONFIG_DISPLAY_FULL_FRAME_BUFFER) && !defined(CONFIG_DISPLAY_FULL_FRAME_BUFFER_DOUBLE)
- .on_color_trans_done = color_trans_done,
+ .on_color_trans_done = color_trans_done,
#endif
- .trans_queue_depth = TRANSFER_QUEUE_DEPTH,
- };
+ .trans_queue_depth = TRANSFER_QUEUE_DEPTH,
+ };
ESP_ERROR_CHECK(
esp_lcd_new_panel_io_spi((esp_lcd_spi_bus_handle_t)CONFIG_DISPLAY_SPI_HOST, &io_config, &io_handle));
diff --git a/main/qrcode.c b/main/qrcode.c
index d1bee44..69a16fe 100644
--- a/main/qrcode.c
+++ b/main/qrcode.c
@@ -38,7 +38,7 @@
#include <stdlib.h>
#include <string.h>
-//#pragma mark - Error Correction Lookup tables
+// #pragma mark - Error Correction Lookup tables
#if LOCK_VERSION == 0
@@ -109,7 +109,7 @@ static int max(int a, int b)
}
*/
-//#pragma mark - Mode testing and conversion
+// #pragma mark - Mode testing and conversion
static int8_t getAlphanumeric(char c)
{
@@ -166,7 +166,7 @@ static bool isNumeric(const char* text, uint16_t length)
return true;
}
-//#pragma mark - Counting
+// #pragma mark - Counting
// We store the following tightly packed (less 8) in modeInfo
// <=9 <=26 <= 40
@@ -199,7 +199,7 @@ static char getModeBits(uint8_t version, uint8_t mode)
return result;
}
-//#pragma mark - BitBucket
+// #pragma mark - BitBucket
typedef struct BitBucket {
uint32_t bitOffsetOrWidth;
@@ -284,7 +284,7 @@ static bool bb_getBit(BitBucket* bitGrid, uint8_t x, uint8_t y)
return (bitGrid->data[offset >> 3] & (1 << (7 - (offset & 0x07)))) != 0;
}
-//#pragma mark - Drawing Patterns
+// #pragma mark - Drawing Patterns
// XORs the data modules in this QR Code with the given mask pattern. Due to XOR's mathematical
// properties, calling applyMask(m) twice with the same value is equivalent to no change at all.
@@ -534,7 +534,7 @@ static void drawCodewords(BitBucket* modules, BitBucket* isFunction, BitBucket*
}
}
-//#pragma mark - Penalty Calculation
+// #pragma mark - Penalty Calculation
#define PENALTY_N1 3
#define PENALTY_N2 3
@@ -636,7 +636,7 @@ static uint32_t getPenaltyScore(BitBucket* modules)
return result;
}
-//#pragma mark - Reed-Solomon Generator
+// #pragma mark - Reed-Solomon Generator
static uint8_t rs_multiply(uint8_t x, uint8_t y)
{
@@ -692,7 +692,7 @@ static void rs_getRemainder(
}
}
-//#pragma mark - QrCode
+// #pragma mark - QrCode
static int8_t encodeDataCodewords(BitBucket* dataCodewords, const uint8_t* text, uint16_t length, uint8_t version)
{
@@ -839,7 +839,7 @@ static void performErrorCorrection(uint8_t version, uint8_t ecc, BitBucket* data
// The format bits can be determined by ECC_FORMAT_BITS >> (2 * ecc)
static const uint8_t ECC_FORMAT_BITS = (0x02 << 6) | (0x03 << 4) | (0x00 << 2) | (0x01 << 0);
-//#pragma mark - Public QRCode functions
+// #pragma mark - Public QRCode functions
uint16_t qrcode_getBufferSize(uint8_t version) { return bb_getGridSizeBytes(4 * version + 17); }
diff --git a/main/ui/dashboard.c b/main/ui/dashboard.c
index 2abc594..182ca2e 100644
--- a/main/ui/dashboard.c
+++ b/main/ui/dashboard.c
@@ -309,13 +309,12 @@ gui_activity_t* make_unlocked_settings_activity(void)
btn_data_t hdrbtns[] = { { .txt = "=", .font = JADE_SYMBOLS_16x16_FONT, .ev_id = BTN_SETTINGS_EXIT },
{ .txt = NULL, .font = GUI_DEFAULT_FONT, .ev_id = GUI_BUTTON_EVENT_NONE } };
- btn_data_t menubtns[]
- = { { .txt = "Wallet", .font = GUI_DEFAULT_FONT, .ev_id = BTN_SETTINGS_WALLET },
- { .txt = "Device", .font = GUI_DEFAULT_FONT, .ev_id = BTN_SETTINGS_DEVICE },
+ btn_data_t menubtns[] = { { .txt = "Wallet", .font = GUI_DEFAULT_FONT, .ev_id = BTN_SETTINGS_WALLET },
+ { .txt = "Device", .font = GUI_DEFAULT_FONT, .ev_id = BTN_SETTINGS_DEVICE },
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(CONFIG_HAS_BATTERY)
- { .txt = "USB Storage", .font = GUI_DEFAULT_FONT, .ev_id = BTN_SETTINGS_USBSTORAGE },
+ { .txt = "USB Storage", .font = GUI_DEFAULT_FONT, .ev_id = BTN_SETTINGS_USBSTORAGE },
#endif
- { .txt = "Authentication", .font = GUI_DEFAULT_FONT, .ev_id = BTN_SETTINGS_AUTHENTICATION } };
+ { .txt = "Authentication", .font = GUI_DEFAULT_FONT, .ev_id = BTN_SETTINGS_AUTHENTICATION } };
return make_menu_activity("Options", hdrbtns, 2, menubtns, sizeof(menubtns) / sizeof(btn_data_t));
}
diff --git a/main/ui/dialogs.c b/main/ui/dialogs.c
index c8b2293..1261374 100644
--- a/main/ui/dialogs.c
+++ b/main/ui/dialogs.c
@@ -30,7 +30,7 @@ gui_view_node_t* make_even_split(const ui_button_layout_t layout, const uint8_t
// num_splits range asserted in switch below
// Make the split relevant for the number of buttons
- typedef void (*make_split_fn)(gui_view_node_t * *ptr, enum gui_split_type kind, uint8_t parts, ...);
+ typedef void (*make_split_fn)(gui_view_node_t** ptr, enum gui_split_type kind, uint8_t parts, ...);
make_split_fn make_split = (layout == UI_COLUMN) ? gui_make_vsplit : gui_make_hsplit;
// Make a split for the number of buttons (if greater than one)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.