From: Matthias Maennich Date: Sat, 25 Jan 2020 22:57:38 +0000 (+0000) Subject: Fix / add include guards X-Git-Tag: upstream/1.7~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe214f0f702834e3b3cb1903a3ac320a00609ee9;p=platform%2Fupstream%2Flibabigail.git Fix / add include guards Fix the include guards of abg-dwarf-reader.h and abg-reporter-priv.h by moving them before any other includes where they actually belongs. Add missing include guards for abg-libxml-utils.h and abg-libzip-utils.h. * include/abg-dwarf-reader.h: Move include guard to the beginning. * include/abg-reporter-priv.h: Likewise. * include/abg-libxml-utils.h: Add include guard. * include/abg-libzip-utils.h: Likewise. Signed-off-by: Matthias Maennich --- diff --git a/include/abg-dwarf-reader.h b/include/abg-dwarf-reader.h index 641428fa..08c983af 100644 --- a/include/abg-dwarf-reader.h +++ b/include/abg-dwarf-reader.h @@ -26,14 +26,14 @@ /// de-serialize an instance of @ref abigail::corpus from a file in /// elf format, containing dwarf information. +#ifndef __ABG_DWARF_READER_H__ +#define __ABG_DWARF_READER_H__ + #include #include #include "abg-corpus.h" #include "abg-suppression.h" -#ifndef __ABG_DWARF_READER_H__ -#define __ABG_DWARF_READER_H__ - namespace abigail { diff --git a/include/abg-libxml-utils.h b/include/abg-libxml-utils.h index e90ed769..54f50836 100644 --- a/include/abg-libxml-utils.h +++ b/include/abg-libxml-utils.h @@ -20,6 +20,9 @@ /// @file +#ifndef __ABG_LIBXML_UTILS_H__ +#define __ABG_LIBXML_UTILS_H__ + #include #include "abg-sptr-utils.h" #include "abg-cxx-compat.h" @@ -119,3 +122,4 @@ unescape_xml_comment(const std::string& str); }//end namespace xml }//end namespace abigail +#endif //__ABG_LIBXML_UTILS_H__ diff --git a/include/abg-libzip-utils.h b/include/abg-libzip-utils.h index 98a326f5..bed4eacd 100644 --- a/include/abg-libzip-utils.h +++ b/include/abg-libzip-utils.h @@ -20,6 +20,9 @@ /// @file +#ifndef __ABG_LIBZIP_UTILS_H__ +#define __ABG_LIBZIP_UTILS_H__ + #include #include "abg-cxx-compat.h" @@ -70,3 +73,4 @@ zip_file_sptr open_file_in_archive(zip_sptr archive, }// end namespace zip }// end namespace abigail +#endif //__ABG_LIBZIP_UTILS_H__ diff --git a/src/abg-reporter-priv.h b/src/abg-reporter-priv.h index 530b7488..aece9ea6 100644 --- a/src/abg-reporter-priv.h +++ b/src/abg-reporter-priv.h @@ -20,12 +20,12 @@ // // Author: Dodji Seketeli -#include "abg-comparison.h" -#include "abg-reporter.h" - #ifndef __ABG_REPORTER_PRIV_H__ #define __ABG_REPORTER_PRIV_H__ +#include "abg-comparison.h" +#include "abg-reporter.h" + /// This is a subroutine of a *::report() function. /// /// If the diff about two subjects S1 and S2 was reported earlier or