Skip to content

Conversation

eleanorLYJ
Copy link
Collaborator

When compiling with clang, the following warning message was generated:

src/utils.c:35:24: warning: unused function 'mult_frac' [-Wunused-function]
35 | static inline uint64_t mult_frac(uint64_t x, uint64_t n, uint64_t d)
| ^~~~~~~~~
1 warning generated.

To prevent this warning, a preprocessor condition
('#if !defined(HAVE_POSIX_TIMER)') was added, ensuring the function is only compiled when necessary.

Reported-by: Kuan-Wei Chiu [email protected]

When compiling with clang, the following warning message was generated:

src/utils.c:35:24: warning: unused function 'mult_frac' [-Wunused-function]
   35 | static inline uint64_t mult_frac(uint64_t x, uint64_t n, uint64_t d)
      |                        ^~~~~~~~~
1 warning generated.

To prevent this warning, a preprocessor condition
('#if !defined(HAVE_POSIX_TIMER)') was added, ensuring the function is
only compiled when necessary.

Reported-by: Kuan-Wei Chiu <[email protected]>
@jserv jserv merged commit 576f30a into sysprog21:master Dec 1, 2024
8 checks passed
@jserv
Copy link
Contributor

jserv commented Dec 1, 2024

Thank @eleanorLYJ for contributing!

vestata pushed a commit to vestata/rv32emu that referenced this pull request Jan 24, 2025
Fix unused function warning in 'mult_frac'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants