linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* arch/powerpc/boot/addnote.c:75:47: warning: right shift count >= width of type [-Wshift-count-overflow]
@ 2018-06-20 11:29 Mathieu Malaterre
  0 siblings, 0 replies; only message in thread
From: Mathieu Malaterre @ 2018-06-20 11:29 UTC (permalink / raw)
  To: linuxppc-dev

Hi there,

For some reason I am seeing some new warning (W=3D0) on some old code.
Anyone else seeing them ?

  HOSTCC  arch/powerpc/boot/addnote
arch/powerpc/boot/addnote.c: In function =E2=80=98main=E2=80=99:
arch/powerpc/boot/addnote.c:75:47: warning: right shift count >=3D width
of type [-Wshift-count-overflow]
 #define PUT_64BE(off, v)((PUT_32BE((off), (v) >> 32L), \
                                               ^
arch/powerpc/boot/addnote.c:72:39: note: in definition of macro =E2=80=98PU=
T_16BE=E2=80=99
 #define PUT_16BE(off, v)(buf[off] =3D ((v) >> 8) & 0xff, \
                                       ^
arch/powerpc/boot/addnote.c:75:27: note: in expansion of macro =E2=80=98PUT=
_32BE=E2=80=99
 #define PUT_64BE(off, v)((PUT_32BE((off), (v) >> 32L), \
                           ^~~~~~~~
arch/powerpc/boot/addnote.c:94:50: note: in expansion of macro =E2=80=98PUT=
_64BE=E2=80=99
 #define PUT_64(off, v)  (e_data =3D=3D ELFDATA2MSB ? PUT_64BE(off, v) : \
                                                  ^~~~~~~~
arch/powerpc/boot/addnote.c:183:3: note: in expansion of macro =E2=80=98PUT=
_64=E2=80=99
   PUT_64(ph + PH_OFFSET, ns);
   ^~~~~~
arch/powerpc/boot/addnote.c:75:47: warning: right shift count >=3D width
of type [-Wshift-count-overflow]
 #define PUT_64BE(off, v)((PUT_32BE((off), (v) >> 32L), \
                                               ^
arch/powerpc/boot/addnote.c:73:23: note: in definition of macro =E2=80=98PU=
T_16BE=E2=80=99
     buf[(off) + 1] =3D (v) & 0xff)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-06-20 11:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-20 11:29 arch/powerpc/boot/addnote.c:75:47: warning: right shift count >= width of type [-Wshift-count-overflow] Mathieu Malaterre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).