From: Petr Machata Date: Thu, 7 Apr 2011 14:36:51 +0000 (+0200) Subject: dwarflint: Convert WHERE to a function X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=088e13dd387acef46f43f3c9fa7d478c8afadc23;p=thirdparty%2Felfutils.git dwarflint: Convert WHERE to a function --- diff --git a/dwarflint/where.h b/dwarflint/where.h index c5e22761f..fb1dd47a5 100644 --- a/dwarflint/where.h +++ b/dwarflint/where.h @@ -1,5 +1,5 @@ /* Pedantic checking of DWARF files - Copyright (C) 2009,2010 Red Hat, Inc. + Copyright (C) 2009,2010,2011 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -55,12 +55,6 @@ extern "C" struct where const *next; // For forming "caused-by" chains. }; -# define WHERE(SECTION, NEXT) \ - ((struct where) \ - {(SECTION), wf_plain, \ - (uint64_t)-1, (uint64_t)-1, (uint64_t)-1, \ - NULL, NEXT}) - extern const char *where_fmt (const struct where *wh, char *ptr); extern void where_fmt_chain (const struct where *wh, const char *severity); extern void where_reset_1 (struct where *wh, uint64_t addr); @@ -72,6 +66,18 @@ extern "C" #include +inline where +WHERE (section_id sec, where const *next = NULL) +{ + where ret = {sec, wf_plain, + (uint64_t)-1, + (uint64_t)-1, + (uint64_t)-1, + NULL, next}; + return ret; +} + + inline std::ostream & operator << (std::ostream &os, where const &wh) {