Skip to content

Commit

Permalink
Fix to create a fake with a name containing 'asm' properly (#78)
Browse files Browse the repository at this point in the history
* Fix to create a fake with a name containing 'asm' properly

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
sangmo-kang and pre-commit-ci[bot] committed Apr 10, 2024
1 parent 5ccf5fc commit 5bc1545
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions autofff/config.py
Expand Up @@ -57,9 +57,7 @@
GCC_SCANNER_CPP_DEFINE_PREFIX_DEF = "-D"

GCC_SCANNER_NON_STANDARD_IGNORE_PATTERN = "non_standard_ignore_pattern"
GCC_SCANNER_NON_STANDARD_IGNORE_PATTERN_DEF = (
r"([\s\n]*(__asm|asm)[\s\n]*(volatile|[\s\n]*)(goto|[\s\n]*)(.|\n|;)*?;)"
)
GCC_SCANNER_NON_STANDARD_IGNORE_PATTERN_DEF = r"([\s\n]*(\W(__asm|asm|__asm__)\W)[\s\n]*(volatile|[\s\n]*)(goto|[\s\n]*)(.|\n|;)*?;)"

GCC_SCANNER_ERROR_CONTEXT_PREV_LINES = "error_context_prev_lines"
GCC_SCANNER_ERROR_CONTEXT_PREV_LINES_MIN = 0
Expand Down
2 changes: 1 addition & 1 deletion config.ini
Expand Up @@ -34,7 +34,7 @@ cpp_define_prefix="-D"
# therefore cause compiler errors when autofff tries to parse the preprocessor
# output. This primarily applies to assembler instructions.
# default: "([\s\n]*(__asm|asm)[\s\n]*(volatile|[\s\n]*)(goto|[\s\n]*)(.|\n|;)*?;)"
non_standard_ignore_pattern="([\s\n]*(__asm|asm)[\s\n]*(volatile|[\s\n]*)(goto|[\s\n]*)(.|\n|;)*?;)"
non_standard_ignore_pattern="([\s\n]*(\W(__asm|asm|__asm__)\W)[\s\n]*(volatile|[\s\n]*)(goto|[\s\n]*)(.|\n|;)*?;)"

# Number of lines before the faulty line that should be included in the error
# context if a parsing error occurs.
Expand Down
2 changes: 2 additions & 0 deletions examples/simple-headers/driver.h
Expand Up @@ -31,6 +31,8 @@ size_t Driver_Write(const uint8_t *buffer, const size_t size);
/* Showcasing out-parameter pointers */
void Driver_GrabBuffer(const uint8_t **buffer, size_t *size);

uint16_t Driver_Hasmember(void);

/* Showcasing in-line function pointer parameters */
void Driver_PowerUp(Config (*config_cb)(void *arg));

Expand Down

0 comments on commit 5bc1545

Please sign in to comment.