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
Contributor

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!

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