Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unused function warning in 'mult_frac' #517

Merged
merged 1 commit into from
Dec 1, 2024

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 visitorckw@gmail.com

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 <visitorckw@gmail.com>
@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