Hmm, BRAND_STRUCT_S could be simplified into a single struct def -
works on both MSVC and GCC.

Reviewed-by: Ryszard Knop <ryszard.k...@linux.intel.com>

On Tue, 2018-11-06 at 18:58 +0100, ard.biesheuvela wrote:
> Move the extern declaration of mBrandingTable[] after the definition
> of
> the type. This solves a build issue with GCC.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> ---
>  IntelUndiPkg/GigUndiDxe/DeviceSupport.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/IntelUndiPkg/GigUndiDxe/DeviceSupport.h
> b/IntelUndiPkg/GigUndiDxe/DeviceSupport.h
> index e156b587f6a7..e2b730131f8e 100644
> --- a/IntelUndiPkg/GigUndiDxe/DeviceSupport.h
> +++ b/IntelUndiPkg/GigUndiDxe/DeviceSupport.h
> @@ -33,9 +33,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> POSSIBILITY OF SUCH DAMAGE.
>  
>  typedef struct BRAND_STRUCT_S BRAND_STRUCT;
>  
> -extern BRAND_STRUCT mBrandingTable[];
> -extern UINTN        mBrandingTableSize;
> -
>  /* Defines */
>  #define INVALID_VENDOR_ID     0xFFFF
>  #define INVALID_SUBVENDOR_ID  0xFFFF
> @@ -53,6 +50,9 @@ struct BRAND_STRUCT_S {
>    CHAR16 *BrandString;
>  };
>  
> +extern BRAND_STRUCT mBrandingTable[];
> +extern UINTN        mBrandingTableSize;
> +
>  /* Function declarations */
>  
>  /** Returns pointer to current device's branding string (looks for
> best match)

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to