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 abs() warning in dd_controller.c #1109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rosalie241
Copy link
Contributor

This fixes the following compiler warning:

    CC  _obj/device/dd/dd_controller.o
../../src/device/dd/dd_controller.c: In function ‘write_dd_regs’:
../../src/device/dd/dd_controller.c:512:30: warning: taking the absolute value of unsigned type ‘unsigned int’ has no effect [-Wabsolute-value]
  512 |             cycles += 4825 * abs(track - old_track);
      |                              ^~~
../../src/device/dd/dd_controller.c:547:30: warning: taking the absolute value of unsigned type ‘unsigned int’ has no effect [-Wabsolute-value]
  547 |             cycles += 4825 * abs(track - old_track);
      |               

I've asked @LuigiBlood for advice on what to change and this is the result of that.

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.

1 participant