From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=sigmaepsilon92@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AA95C222F4E03 for ; Fri, 22 Dec 2017 11:09:30 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id 9so23513266wme.4 for ; Fri, 22 Dec 2017 11:14:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U9g32NzBwdM5QBZu5g/I/kxoqwRbpbvdrfWuJDJnHYk=; b=qmr3y3j3zhx0ipcdRygpl0etIVLQ8qvQSX5OIQmJB20t8BYymkMpzeYy/1qxJgDlGS fhXuZdiO4jQDzvFR995KPlYAHcBpnmwdQe3voG6LApPL41P8Dzzdc9tPmpboouDc1dEu hsraepfCLwXkxSfFmbGZwelRg6dnhvA4R5qqWgl83yQirNZa7GM08dTaB8dKl/+bU3Vb vvsiewSnMrt5f8wNubB4r/EyIfCsR/xSUUHRXVLfvI+CMooz/IeY/A2QfIa8JiEAQBVv SRet2DSgL0x3pLuu77XI/MlN8ErwFj13JrnnEb4+WsBX74f7Sriz65tOYhL62rWLSt9B koow== 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; bh=U9g32NzBwdM5QBZu5g/I/kxoqwRbpbvdrfWuJDJnHYk=; b=R2AaQzJr5c/oXdMAGfQe6gGu9ndY2F1PbFOLnldEtgCR23g27zyQerq4Uv4zBjc6R6 VJCULyDQ7aOqAS1P9WwzS3EpzqMZmPm6j8PJrgOoZ8vVOE5z5L/wtZRcMd9enCiSy2YX cJ+sLVXVkU+QUZzNmwWG5J67DTt3M7VKm07g8fOypIge0i7H0v4q3ruT6UCSDdpNgHfZ Gu+VdhKb+W5cV6ATzHRUSy2tX0/1ucrVa2WixKkc/0PO9wFwTiriWxXkN9vw1shjNzlO IGVXI6+sYbBPKkvr029sQrfiRWJIgYtIaQDtFhXTuVSIexF8avzdzKgTIOeBnVFgQx2e tmAA== X-Gm-Message-State: AKGB3mLpzkc55mq2+ieRHutDiYYwiHdeG2yxEa8BCZGHUHXdw8UIC8Yd weke6AMdKIa0GLZceYwgk/rK0b59 X-Google-Smtp-Source: ACJfBouIdQGnmY2OStqShPsjvk+DNFszv5nKRN0qrMM7uLNe2JsOIlHj4AmTYjb9C0fj6yriB0/LzA== X-Received: by 10.28.88.65 with SMTP id m62mr14594528wmb.111.1513970059152; Fri, 22 Dec 2017 11:14:19 -0800 (PST) Received: from localhost.localdomain ([2a02:908:5a9:8400:5ec8:3210:9b68:c91c]) by smtp.gmail.com with ESMTPSA id t10sm27622204wra.16.2017.12.22.11.14.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Dec 2017 11:14:18 -0800 (PST) From: M1cha To: edk2-devel@lists.01.org Cc: Ard Biesheuvel , Michael D Kinney , Liming Gao Date: Fri, 22 Dec 2017 20:14:16 +0100 Message-Id: <20171222191416.5105-2-sigmaepsilon92@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171222191416.5105-1-sigmaepsilon92@gmail.com> References: <20171222191416.5105-1-sigmaepsilon92@gmail.com> Subject: [PATCH v2 3/3] MdePkg: add NORETURN attribute to LongJump and InternalLongJump X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 19:09:31 -0000 This fixes compiler warnings when using them in functions which should return a value but rely on LongJump to never return instead. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Zimmermann --- MdePkg/Include/Library/BaseLib.h | 1 + MdePkg/Library/BaseLib/BaseLibInternals.h | 1 + MdePkg/Library/BaseLib/Ebc/SetJumpLongJump.c | 1 + MdePkg/Library/BaseLib/Ia32/LongJump.c | 1 + MdePkg/Library/BaseLib/LongJump.c | 1 + 5 files changed, 5 insertions(+) diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index 10976032adaa..e2eb46da4584 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -4929,6 +4929,7 @@ SetJump ( **/ VOID EFIAPI +NORETURN LongJump ( IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, IN UINTN Value diff --git a/MdePkg/Library/BaseLib/BaseLibInternals.h b/MdePkg/Library/BaseLib/BaseLibInternals.h index 9dca97a0dcc9..4486b15bd151 100644 --- a/MdePkg/Library/BaseLib/BaseLibInternals.h +++ b/MdePkg/Library/BaseLib/BaseLibInternals.h @@ -443,6 +443,7 @@ InternalAssertJumpBuffer ( **/ VOID EFIAPI +NORETURN InternalLongJump ( IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, IN UINTN Value diff --git a/MdePkg/Library/BaseLib/Ebc/SetJumpLongJump.c b/MdePkg/Library/BaseLib/Ebc/SetJumpLongJump.c index e309e8b57d7a..255464240ffa 100644 --- a/MdePkg/Library/BaseLib/Ebc/SetJumpLongJump.c +++ b/MdePkg/Library/BaseLib/Ebc/SetJumpLongJump.c @@ -56,6 +56,7 @@ SetJump ( **/ VOID EFIAPI +NORETURN InternalLongJump ( IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, IN UINTN Value diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.c b/MdePkg/Library/BaseLib/Ia32/LongJump.c index 73973a9cceae..d4b101fcb213 100644 --- a/MdePkg/Library/BaseLib/Ia32/LongJump.c +++ b/MdePkg/Library/BaseLib/Ia32/LongJump.c @@ -30,6 +30,7 @@ __declspec (naked) VOID EFIAPI +NORETURN InternalLongJump ( IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, IN UINTN Value diff --git a/MdePkg/Library/BaseLib/LongJump.c b/MdePkg/Library/BaseLib/LongJump.c index 062be8f2daa1..7b91e076ba60 100644 --- a/MdePkg/Library/BaseLib/LongJump.c +++ b/MdePkg/Library/BaseLib/LongJump.c @@ -35,6 +35,7 @@ **/ VOID EFIAPI +NORETURN LongJump ( IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer, IN UINTN Value -- 2.15.1