public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix / add include guards
@ 2020-01-01  0:00 Matthias Maennich via libabigail
  2020-01-01  0:00 ` Dodji Seketeli
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Maennich via libabigail @ 2020-01-01  0:00 UTC (permalink / raw)
  To: libabigail; +Cc: dodji, kernel-team, maennich

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 <maennich@google.com>
---
 include/abg-dwarf-reader.h | 6 +++---
 include/abg-libxml-utils.h | 4 ++++
 include/abg-libzip-utils.h | 4 ++++
 src/abg-reporter-priv.h    | 6 +++---
 4 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/include/abg-dwarf-reader.h b/include/abg-dwarf-reader.h
index 641428fa6499..08c983af865a 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 <ostream>
 #include <elfutils/libdwfl.h>
 #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 e90ed769b734..54f508368019 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 <istream>
 #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 98a326f5f7a1..bed4eacd250f 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 <zip.h>
 #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 530b748800e3..aece9ea65fa2 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
-- 
2.25.0.341.g760bfbb309-goog

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix / add include guards
  2020-01-01  0:00 [PATCH] Fix / add include guards Matthias Maennich via libabigail
@ 2020-01-01  0:00 ` Dodji Seketeli
  2020-01-01  0:00   ` Matthias Maennich via libabigail
  0 siblings, 1 reply; 3+ messages in thread
From: Dodji Seketeli @ 2020-01-01  0:00 UTC (permalink / raw)
  To: Matthias Maennich; +Cc: libabigail, kernel-team

Hello Matthias,

Matthias Maennich <maennich@google.com> a écrit:

> 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.

This is OK to commit to master.

Thanks!

-- 
		Dodji

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix / add include guards
  2020-01-01  0:00 ` Dodji Seketeli
@ 2020-01-01  0:00   ` Matthias Maennich via libabigail
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Maennich via libabigail @ 2020-01-01  0:00 UTC (permalink / raw)
  To: Dodji Seketeli; +Cc: libabigail, kernel-team

On Mon, Jan 27, 2020 at 04:22:21PM +0100, Dodji Seketeli wrote:
>Hello Matthias,
>
>Matthias Maennich <maennich@google.com> a écrit:
>
>> 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.
>
>This is OK to commit to master.

Done. Thanks!

Cheers,
Matthias

>
>Thanks!
>
>-- 
>		Dodji

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-27 15:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-01  0:00 [PATCH] Fix / add include guards Matthias Maennich via libabigail
2020-01-01  0:00 ` Dodji Seketeli
2020-01-01  0:00   ` Matthias Maennich via libabigail

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).