On Wed, 29 Nov 2023, Antonin Décimo wrote:

MSVC warns against relative path in include directives.
warning C4464: relative include path contains '..'
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4464?view=msvc-170

Signed-off-by: Antonin Décimo <[email protected]>
---
mingw-w64-libraries/winpthreads/src/barrier.h | 2 +-
mingw-w64-libraries/winpthreads/src/misc.c    | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-libraries/winpthreads/src/barrier.h 
b/mingw-w64-libraries/winpthreads/src/barrier.h
index b1d80d1bb..5509678be 100644
--- a/mingw-w64-libraries/winpthreads/src/barrier.h
+++ b/mingw-w64-libraries/winpthreads/src/barrier.h
@@ -34,7 +34,7 @@
            return EINVAL;                                              \
    } while (0)

-#include "../include/semaphore.h"
+#include "semaphore.h"

typedef struct barrier_t barrier_t;
struct barrier_t
diff --git a/mingw-w64-libraries/winpthreads/src/misc.c 
b/mingw-w64-libraries/winpthreads/src/misc.c
index 800347854..83caf262f 100644
--- a/mingw-w64-libraries/winpthreads/src/misc.c
+++ b/mingw-w64-libraries/winpthreads/src/misc.c
@@ -20,8 +20,8 @@
   DEALINGS IN THE SOFTWARE.
*/

+#include <windows.h>
#include "pthread.h"
-#include "windows.h"
#include "misc.h"


This part of the change, while it probably can be reasonable, doesn't match the description of the change in the body of the commit message (while it probably can be considered belonging to the general theme of the subject line of the patch). If you'd add a separate pargraph to the commit message explaining the reasoning for this one, it can probably be fine to keep both in the same commit.

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to