From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=f3rvlzR2; spf=pass (domain: linaro.org, ip: 209.85.221.65, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by groups.io with SMTP; Fri, 31 May 2019 05:50:17 -0700 Received: by mail-wr1-f65.google.com with SMTP id b18so6424394wrq.12 for ; Fri, 31 May 2019 05:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z9SDmt1OP2mtKaUCoPUYyaSauXWAgI4Vi4lMOifv1C8=; b=f3rvlzR2F+zzMC2QpbhTKus0VQHLAlhoUmkp9RUvgVinqTxap0WaQM23yLpOVB9L7x I6R6z4VkwZnqYYAlsNN4a7+GsMOL5tuV4d31dWx2W1c0cNh145SMQ+xDCwsrlPMvHwef RbIh9EuIob3bqjQ/DNT6ZkCK/42Dcs1goqCxbETrZkznsMzPvVXUDZdBrxJtCKJTmIsJ K0qAmtaaeYTGXdUSCE3y6UQJdZfYj9Fh8E1Zo+VMKKQheTXv6rVQT1cU4ZebPJ+ePDfD skTzApg2cPAdBoW+ssOoMUS6w6AwJxzQ948bsVyaWlOnhpMiWszrT8h3EJC2uejKEKAE 8efA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z9SDmt1OP2mtKaUCoPUYyaSauXWAgI4Vi4lMOifv1C8=; b=b58TWOBhZJUeexVbUFN+Wze01fsN1xQXiHx9Dt5xG1pfa6LtktWxQp4nobZM8j/zBS nh1IAFiv30n+rdFpRPwfb+XwZw3VIRe7GGQSJTn+DWBIsrgkZ8CzSwb6t0pjGx6+DqLw 9GoA524N6o60hquXDvqAw/U+Xtt5hvIWVienusu1/ZqYkI2AexWrhFW9Wg0Bh9d56ROq rg4mjvJ8O0JV2G0yCoItWV5b7EmegtkCfbIKvwG25NImZm6q3/hrBDR7mikDZA+k+hwi UsU7qa2BtovObRKZYxqxZsq732zL+Cz+m/vYRx06tkZmsX9sFmIr4WZchjcl/MtqU8G7 7F8w== X-Gm-Message-State: APjAAAWQcV85OJI+IiWW8syHG3pqzrN4ReaB8rHttRyE4Xog3f9P48z0 ougMgd1760YVuqlU6bEq93h984nwIE8= X-Google-Smtp-Source: APXvYqxE2GzGSEJLt0l434PJZNSdmnxD+iGy/T6fVSEqocTDoAhZZevMRqCsUT4pcIQhbDsnFl2JbA== X-Received: by 2002:adf:c982:: with SMTP id f2mr6728518wrh.235.1559307015943; Fri, 31 May 2019 05:50:15 -0700 (PDT) Return-Path: Received: from sudo.home ([2a01:cb1d:112:6f00:c225:e9ff:fe2e:ea8]) by smtp.gmail.com with ESMTPSA id b9sm6385076wma.29.2019.05.31.05.50.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 05:50:14 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Laszlo Ersek , "Gao, Liming" , "Wang, Jian J" , Leif Lindholm , Michael D Kinney Subject: [PATCH v3 6/7] MdeModulePkg/PeCoffImageEmulator: avoid redeclaration of typedef Date: Fri, 31 May 2019 14:49:57 +0200 Message-Id: <20190531124958.8421-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190531124958.8421-1-ard.biesheuvel@linaro.org> References: <20190531124958.8421-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The usual pattern of defining a protocol in EDK2 is typedef struct _FOO_PROTOCOL FOO_PROTOCOL; struct _FOO_PROTOCOL { ... }; However, in the definition of EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL, we are deviating from this for no good reason, and instead, the struct definition is combined with a redefinition of the first typedef, and this is not permitted before C11. Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Include/Protocol/PeCoffImageEmulator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Include/Protocol/PeCoffImageEmulator.h b/MdeModulePkg/Include/Protocol/PeCoffImageEmulator.h index 29633e9a8ed4..9ea080eefb56 100644 --- a/MdeModulePkg/Include/Protocol/PeCoffImageEmulator.h +++ b/MdeModulePkg/Include/Protocol/PeCoffImageEmulator.h @@ -91,7 +91,7 @@ EFI_STATUS #define EDKII_PECOFF_IMAGE_EMULATOR_VERSION 0x1 -typedef struct _EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL { +struct _EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL { EDKII_PECOFF_IMAGE_EMULATOR_IS_IMAGE_SUPPORTED IsImageSupported; EDKII_PECOFF_IMAGE_EMULATOR_REGISTER_IMAGE RegisterImage; EDKII_PECOFF_IMAGE_EMULATOR_UNREGISTER_IMAGE UnregisterImage; @@ -100,7 +100,7 @@ typedef struct _EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL { UINT32 Version; // The machine type implemented by the emulator UINT16 MachineType; -} EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL; +}; extern EFI_GUID gEdkiiPeCoffImageEmulatorProtocolGuid; -- 2.20.1