Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

Commit

Permalink
fix prev compiler error
Browse files Browse the repository at this point in the history
  • Loading branch information
lurk101 committed Oct 1, 2024
1 parent 6d3443d commit d8b337d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cc/cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4214,8 +4214,8 @@ int cc(int mode, int argc, char** argv) {
if (mode == 0) {
// check that table is ordered
for (int i = 1; i < NUMOF(externs); i++)
if (strcmp(externs[i - 1].name, externs[i].name) >= 0)
run_fatal("out of order starting at %s\n", externs[i].name);
if (strcmp(externs[i].name, externs[i - 1].name) <= 0)
run_fatal("out of order starting at %s\n %s", externs[i - 1].name, externs[i].name);
// Register keywords in symbol table. Must match the sequence of enum
p = "enum char int float struct union sizeof return goto break continue "
"if do while for switch case default else void main";
Expand Down
7 changes: 4 additions & 3 deletions cc/cc_extrns.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@
{"i2c_get_dreq", 2, i2c_defines, i2c_get_dreq, 0},
{"i2c_get_hw", 1, i2c_defines, i2c_get_hw, 0},
#if PICO_SDK_VERSION_MAJOR >= 2
{"i3c_get_index", 1, i2c_defines, i2c_get_index, 0},
#else
{"i2c_hw_index", 1, i2c_defines, i2c_hw_index, 0},
{"i2c_get_index", 1, i2c_defines, i2c_get_index, 0},
#endif
{"i2c_get_read_available", 1, i2c_defines, i2c_get_read_available, 0},
{"i2c_get_write_available", 1, i2c_defines, i2c_get_write_available, 0},
#if PICO_SDK_VERSION_MAJOR < 2
{"i2c_hw_index", 1, i2c_defines, i2c_hw_index, 0},
#endif
{"i2c_init", 2, i2c_defines, i2c_init, 0},
{"i2c_read_blocking", 5, i2c_defines, i2c_read_blocking, 0},
{"i2c_read_raw_blocking", 3, i2c_defines, i2c_read_raw_blocking, 0},
Expand Down

0 comments on commit d8b337d

Please sign in to comment.