lkml.org 
[lkml]   [2019]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[RFC PATCH] gcc-9: workaround array bounds warning on boot_params cleaning
Date
It should also be possibly to simply cast to u64 and then to u8 * unless
the compiler overzealously tracks out of bound accesses even when
6.3.2.3 #5-6 explicitly allows pointer-integer-pointer conversions like
this and removes previous guarantees. Ie.

memset((u8 *)((u64)(&(boot_params->ext_ramdisk_image))), 0, size)

I apologise for not having the in-reply-to header.

Emil Fihlman

\
 
 \ /
  Last update: 2019-08-06 21:00    [W:0.029 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site