[Openvpn-devel,v12] Disable clang-format for some code parts

Message ID 20250804091027.13509-1-gert@greenie.muc.de
State New
Headers show
Series [Openvpn-devel,v12] Disable clang-format for some code parts | expand

Commit Message

Gert Doering Aug. 4, 2025, 9:10 a.m. UTC
From: Frank Lichtenheld <frank@lichtenheld.com>

These do not come out better with clang-format,
so leave them be.

Change-Id: I4dd0c44982955f16ec4a3f167d4e6f3e9b4dbc11
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/829
This mail reflects revision 12 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <gert@greenie.muc.de>

Comments

Gert Doering Aug. 4, 2025, 9:15 a.m. UTC | #1
What it says... this just adds 2x two magic comments that tell clang-format
"leave this section alone".  Sometimes table-like stuff just doesn't work
very well with auto-formatting...

Your patch has been applied to the master branch.

commit d22f247d6c68283526ddd4ce32ab677209bf56e0
Author: Frank Lichtenheld
Date:   Mon Aug 4 11:10:21 2025 +0200

     Disable clang-format for some code parts

     Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20250804091027.13509-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32492.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/ssl_common.h b/src/openvpn/ssl_common.h
index e9e50da..e9dd5f2 100644
--- a/src/openvpn/ssl_common.h
+++ b/src/openvpn/ssl_common.h
@@ -75,6 +75,7 @@ 
  *
  * @{
  */
+/* clang-format off */
 #define S_ERROR         (-2)    /**< Error state.  */
 #define S_ERROR_PRE     (-1)    /**< Error state but try to send out alerts
                                  *  before killing the keystore and moving
@@ -105,7 +106,7 @@ 
 #define S_GENERATED_KEYS  8     /**< The data channel keys have been generated
                                  *  The TLS session is fully authenticated
                                  *  when reaching this state. */
-
+/* clang-format on */
 /* Note that earlier versions also had a S_OP_NORMAL state that was
  * virtually identical with S_ACTIVE and the code still assumes everything
  * >= S_ACTIVE to be fully operational */
diff --git a/src/tapctl/main.c b/src/tapctl/main.c
index 58ab8cc..a67540d 100644
--- a/src/tapctl/main.c
+++ b/src/tapctl/main.c
@@ -37,6 +37,7 @@ 
 #endif
 
 
+/* clang-format off */
 const WCHAR title_string[] =
     _L(PACKAGE_NAME) L" " _L(PACKAGE_VERSION)
 ;
@@ -111,6 +112,7 @@ 
     L"\n"
     L"tapctl delete <adapter GUID | adapter name>\n"
 ;
+/* clang-format on */
 
 
 /**