From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web11.18112.1595335859803441729 for ; Tue, 21 Jul 2020 05:51:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=VpMmL4Bn; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id o11so21084147wrv.9 for ; Tue, 21 Jul 2020 05:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GT4t+xzeFiQS4/CqtB/+yDO6AcL7uya4ItFDC0k3oNw=; b=VpMmL4BnaymW8ACoFPA4Id3xBLmnOrrLpuuMDlhLgTqjZN3/8fepHJMisdpRAKOChW gvZohUwZsmdIM7mUatkxe8g6kk4LOzGF3oWFNghJ4chIekI/o3A79qXsjmaDnT8uWNV2 4NzrvyRH3XCNybQfYofkxS1HCkrCTOmy/xcE+SgnLuAeEQjQXvIQ2s0BdoBe5DefUgHI WO2lecoRAFrfvD4WLok813qE1wi7jmdbi2FcYPq+CfDJ6RVhIm+6O83PkRPko1ehh6Ih JXhZ65Y0X9pECuAWaOTKdVlBQ+FIgmgj6YcWBy4E2Tf46kyZeyk3+f8ZwbLUcky0QzQ3 nxPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GT4t+xzeFiQS4/CqtB/+yDO6AcL7uya4ItFDC0k3oNw=; b=A7hT/vt4/uhDmI+e3VXLwfNd2HQhc1SFka67s0VTthgpkX5v7RWSfeTzyt/bGe1LZn W/XxgLCALBpI0aal+VnLq94FmjTrPhsdmLtdtBdQvtwue2GCfisv4BqQ3JAlhuLNh+mU EfxomHVL5bZuOjw5NFIsQSmLvtgjxC24p9JLwCg37qLVe161ZfwA2rTkChxEXMAMh7Rd YaP5fpDpFTvWguIHxRyYp2n0RsV2ADD9vCarLBr6nYw1x+1WMyjKAf3oWll1kcq8HL1W 4UuEoR53ylBzzsq+GfAH953l/tz+KbBqbJB8D0X2/xbuk7XMKUoI4sJcv3pzaUOypIag vpYQ== X-Gm-Message-State: AOAM532SHQDbhRplBUhhTtljddpMMwqVj0gX2+H6sMcnMDR09r1v+rLU /URdd5vwf2AXQGMLvT1MW1MODIEGyQ6v8VjHcuSFzuo5N875+nesAfUerlwCAYfLmhLn9xKm2WA XmleRTCyKeZjTkRTi0O9dmvwBDFdhTA7MaZMMEcQvF3tr/zfi2cvXXLxrT/8F4gQRHw== X-Google-Smtp-Source: ABdhPJyK73U4SEbgzW9hc0csxhZuCt6eVavnVW5shR3gq2E4xKHQCi/vEoEcC0MVdN/JT8OgLSPEmg== X-Received: by 2002:adf:e68d:: with SMTP id r13mr25109341wrm.141.1595335857951; Tue, 21 Jul 2020 05:50:57 -0700 (PDT) Return-Path: Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id u84sm3423113wmg.7.2020.07.21.05.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 05:50:57 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Pierre Gondois , Laszlo Ersek , Bob Feng Subject: [PATCH 1/1] EmbeddedPkg: fix gcc build errors in AndroidBootImgLib Date: Tue, 21 Jul 2020 13:50:56 +0100 Message-Id: <20200721125056.32195-1-leif@nuviainc.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit dbd546a32d5a ("BaseTools: Add gcc flag to warn on void* pointer arithmetic") does its work and triggers build errors in this library. Update the affected code to build correctly again. Cc: Pierre Gondois Cc: Laszlo Ersek Cc: Bob Feng Signed-off-by: Leif Lindholm --- Pierre - can you please ensure to CC Arm maintainers when proposing changes to Arm build flags? (And build test all the top-level edk2 packages *cough*.) Bob - can you please ensure Arm maintainers have commented on changes to global build flags? (Would it be possible to break up tools_def.template into separate arch-specific include files so we could have GetMaintainer.py be more helpful for this?) Laszlo - you're not formally an EmbeddedPkg reviewer, but Ard is out for another couple of weeks. But since the Linaro CI is currently broken and the fix is trivial, could you have a look please? EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c index e1036954ee58..15b5bf451330 100644 --- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c +++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c @@ -97,7 +97,7 @@ AndroidBootImgGetKernelInfo ( ASSERT (IS_VALID_ANDROID_PAGE_SIZE (Header->PageSize)); *KernelSize = Header->KernelSize; - *Kernel = BootImg + Header->PageSize; + *Kernel = (VOID *)((UINTN)BootImg + Header->PageSize); return EFI_SUCCESS; } @@ -341,7 +341,7 @@ AndroidBootImgUpdateFdt ( Status = AndroidBootImgSetProperty64 (UpdatedFdtBase, ChosenNode, "linux,initrd-end", - (UINTN)(RamdiskData + RamdiskSize)); + ((UINTN)RamdiskData + RamdiskSize)); if (EFI_ERROR (Status)) { goto Fdt_Exit; } -- 2.20.1