Skip to content

Commit 0cbb988

Browse files
committed
clang-format-18
1 parent 96ced05 commit 0cbb988

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/breakpoint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ breakpoint_map_t breakpoint_map_new()
2222

2323
bool breakpoint_map_insert(breakpoint_map_t map, riscv_word_t addr)
2424
{
25-
breakpoint_t bp = (breakpoint_t) {.addr = addr, .orig_insn = 0};
25+
breakpoint_t bp = (breakpoint_t){.addr = addr, .orig_insn = 0};
2626
map_iter_t it;
2727
map_find(map, &it, &addr);
2828
/* breakpoints are not expected to be set at duplicate addresses */

src/elf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static void fill_symbols(elf_t *e)
191191
{
192192
/* initialize the symbol table */
193193
map_clear(e->symbols);
194-
map_insert(e->symbols, &(int) {0}, &(char *) {NULL});
194+
map_insert(e->symbols, &(int){0}, &(char *){NULL});
195195

196196
/* get the string table */
197197
const char *strtab = get_strtab(e);

src/emulate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static uint32_t csr_csrrc(riscv_t *rv, uint32_t csr, uint32_t val)
331331
void rv_debug(riscv_t *rv)
332332
{
333333
if (!gdbstub_init(&rv->gdbstub, &gdbstub_ops,
334-
(arch_info_t) {
334+
(arch_info_t){
335335
.reg_num = 33,
336336
.reg_byte = 4,
337337
.target_desc = TARGET_RV32,

src/riscv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ riscv_t *rv_create(riscv_user_t rv_attr)
299299
*/
300300
attr->fd_map = map_init(int, FILE *, map_cmp_int);
301301
rv_remap_stdstream(rv,
302-
(fd_stream_pair_t[]) {
302+
(fd_stream_pair_t[]){
303303
{STDIN_FILENO, stdin},
304304
{STDOUT_FILENO, stdout},
305305
{STDERR_FILENO, stderr},

src/rv32_template.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ RVOP(
162162
/* link with return address */
163163
if (ir->rd)
164164
rv->X[ir->rd] = pc + 4;
165-
/* check instruction misaligned */
165+
/* check instruction misaligned */
166166
#if !RV32_HAS(EXT_C)
167167
RV_EXC_MISALIGN_HANDLER(pc, insn, false, 0);
168168
#endif
@@ -269,7 +269,7 @@ RVOP(
269269
if (ir->rd)
270270
rv->X[ir->rd] = pc + 4;
271271

272-
/* check instruction misaligned */
272+
/* check instruction misaligned */
273273
#if !RV32_HAS(EXT_C)
274274
RV_EXC_MISALIGN_HANDLER(pc, insn, false, 0);
275275
#endif

src/syscall_sdl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ void syscall_draw_frame(riscv_t *rv)
318318
int actual_width, actual_height;
319319
SDL_GetWindowSize(window, &actual_width, &actual_height);
320320
SDL_RenderCopy(renderer, texture, NULL,
321-
&(SDL_Rect) {0, 0, actual_width, actual_height});
321+
&(SDL_Rect){0, 0, actual_width, actual_height});
322322
SDL_RenderPresent(renderer);
323323
}
324324

0 commit comments

Comments
 (0)