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

Warnings during build of plugins: mem.h: warning: left shift count >= width of type [-Wshift-count-overflow] #1439

Open
barracuda156 opened this issue Jul 25, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@barracuda156
Copy link

Describe the bug
During the build of audacious-plugins there are a number of shift-count-overflow warnings:

In file included from ../audacious-plugins-4.3.1/src/xsf/desmume/MMU.h:23,
                 from ../audacious-plugins-4.3.1/src/xsf/desmume/armcpu.h:23,
                 from ../audacious-plugins-4.3.1/src/xsf/desmume/cp15.h:21,
                 from ../audacious-plugins-4.3.1/src/xsf/desmume/bios.cc:20:
../audacious-plugins-4.3.1/src/xsf/desmume/mem.h: In function 'uint64_t T1ReadQuad(const uint8_t*, uint32_t)':
../audacious-plugins-4.3.1/src/xsf/desmume/mem.h:83:31: warning: left shift count >= width of type [-Wshift-count-overflow]
   83 |         return (mem[addr + 7] << 56) | (mem[addr + 6] << 48) | (mem[addr + 5] << 40) | (mem[addr + 4] << 32) | (mem[addr + 3] << 24) | (mem[addr + 2] << 16) | (mem[addr + 1] << 8)  | mem[addr];
      |                 ~~~~~~~~~~~~~~^~~~~
../audacious-plugins-4.3.1/src/xsf/desmume/mem.h:83:55: warning: left shift count >= width of type [-Wshift-count-overflow]
   83 |         return (mem[addr + 7] << 56) | (mem[addr + 6] << 48) | (mem[addr + 5] << 40) | (mem[addr + 4] << 32) | (mem[addr + 3] << 24) | (mem[addr + 2] << 16) | (mem[addr + 1] << 8)  | mem[addr];
      |                                         ~~~~~~~~~~~~~~^~~~~
../audacious-plugins-4.3.1/src/xsf/desmume/mem.h:83:79: warning: left shift count >= width of type [-Wshift-count-overflow]
   83 |         return (mem[addr + 7] << 56) | (mem[addr + 6] << 48) | (mem[addr + 5] << 40) | (mem[addr + 4] << 32) | (mem[addr + 3] << 24) | (mem[addr + 2] << 16) | (mem[addr + 1] << 8)  | mem[addr];
      |                                                                 ~~~~~~~~~~~~~~^~~~~
../audacious-plugins-4.3.1/src/xsf/desmume/mem.h:83:103: warning: left shift count >= width of type [-Wshift-count-overflow]
   83 |         return (mem[addr + 7] << 56) | (mem[addr + 6] << 48) | (mem[addr + 5] << 40) | (mem[addr + 4] << 32) | (mem[addr + 3] << 24) | (mem[addr + 2] << 16) | (mem[addr + 1] << 8)  | mem[addr];
      |                                                                                         ~~~~~~~~~~~~~~^~~~~

While this is a warning and not an error, it may still be of concern.

Steps to reproduce
Build audacious-plugins on a 32-bit platform.

Expected behavior
It should build clean.

Additional information

  • Audacious version and interface (Qt / GTK / Winamp)
    4.3.1 +gtk3
  • Operating system and version
    MacOS 10.6 ppc
  • Desktop environment
    MacPorts
@barracuda156 barracuda156 added the Bug Something isn't working label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant