This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

warning: integer operation result is out of range

Hi,

I get a lot of warnings when I try to compile my project.

warning: integer operation result is out of range

All these warnings are produced by the atmel register-header file provided by Keil. I can't see any kind of mistake. Is it possible to disable "only" these warning messages?

e.g.

AT91F_PIO_CfgPeriph(
                AT91C_BASE_PIOA, // PIO controller base address
                ((unsigned int) AT91C_PA31_DMARQ0  ), // Peripheral A
                0); // Peripheral B

best wishes
Fabian

Parents
  • Apparently, the warning is caused by this: (1 << 31). This expression is buried in the header files. The right way to do it is like this: (1u << 31). You could simply do a find-and-replace on the header files to get rid of the warnings.

Reply
  • Apparently, the warning is caused by this: (1 << 31). This expression is buried in the header files. The right way to do it is like this: (1u << 31). You could simply do a find-and-replace on the header files to get rid of the warnings.

Children