URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=57b2a84f3d900eb0b98157095c6aac07cec54fd9
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
57b2a84 by Peter Wu (peter@xxxxxxxxxxxxx):
Use a single WS_NORETURN macro
Having to define two macros for marking a function as never returning
seems a bit redundant. Merge the MSVC and GCC-like attributes into a
single WS_NORETURN.
Tested with Clang 3.7.1, GCC 4.4.7 and even GCC 4.1.2 using this small
program (-Wall -Wextra, the first two generate warnings for
uninitialized variables, the last one compiles without warnings):
#include <stdlib.h>
__attribute__((noreturn)) void foo() { exit(1); }
__attribute__((noreturn)) void bar();
void bar() { exit(1); }
int main() {
int j, i;
if (i) { bar(); return j; }
foo();
return j;
}
Change-Id: I7d19c15e61b8f8fa4936864407199c4109f8cc82
Reviewed-on: https://code.wireshark.org/review/14822
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Actions performed:
from 434bbd6 Fix CMake VC Redist message
adds 57b2a84 Use a single WS_NORETURN macro
Summary of changes:
CMakeLists.txt | 13 +++++++------
cmakeconfig.h.in | 12 +++---------
config.h.win32 | 14 +++-----------
configure.ac | 13 ++-----------
dumpcap.c | 2 +-
epan/except.c | 10 +++++-----
epan/except.h | 10 +++++-----
epan/proto.h | 2 +-
8 files changed, 27 insertions(+), 49 deletions(-)