blob: 964d9442ba9d7816554fd41c7019abf2258a6b08 [file] [log] [blame]
James Kuszmaulcf324122023-01-14 14:07:17 -08001From ad60aa8e1c03cc5f0c88159d37f63b0c063927c7 Mon Sep 17 00:00:00 2001
2From: PJ Reiniger <pj.reiniger@gmail.com>
3Date: Tue, 26 Apr 2022 15:28:52 -0400
4Subject: [PATCH 6/9] Style / comments cleanup
5
6---
7 src/fs-poll.c | 1 +
8 src/unix/core.c | 1 +
9 src/unix/thread.c | 3 +--
10 src/uv-common.c | 1 +
11 src/win/process.c | 1 -
12 src/win/winsock.c | 1 +
13 6 files changed, 5 insertions(+), 3 deletions(-)
14
15diff --git a/src/fs-poll.c b/src/fs-poll.c
16index 5a39daed..1a7ca70d 100644
17--- a/src/fs-poll.c
18+++ b/src/fs-poll.c
19@@ -34,6 +34,7 @@
20 #include <stdlib.h>
21 #include <string.h>
22
23+
24 struct poll_ctx {
25 uv_fs_poll_t* parent_handle;
26 int busy_polling;
27diff --git a/src/unix/core.c b/src/unix/core.c
28index 223c5513..4c23f608 100644
29--- a/src/unix/core.c
30+++ b/src/unix/core.c
31@@ -544,6 +544,7 @@ int uv__accept(int sockfd) {
32 return peerfd;
33 }
34
35+
36 #if defined(__APPLE__)
37 #pragma GCC diagnostic push
38 #pragma GCC diagnostic ignored "-Wdollar-in-identifier-extension"
39diff --git a/src/unix/thread.c b/src/unix/thread.c
40index 64726bd6..392a0715 100644
41--- a/src/unix/thread.c
42+++ b/src/unix/thread.c
43@@ -85,7 +85,6 @@ error2:
44 return rc;
45 }
46
47-
48 int uv_barrier_wait(uv_barrier_t* barrier) {
49 struct _uv_barrier* b;
50 int last;
51@@ -94,6 +93,7 @@ int uv_barrier_wait(uv_barrier_t* barrier) {
52 return UV_EINVAL;
53
54 b = barrier->b;
55+ /* Lock the mutex*/
56 uv_mutex_lock(&b->mutex);
57
58 if (++b->in == b->threshold) {
59@@ -113,7 +113,6 @@ int uv_barrier_wait(uv_barrier_t* barrier) {
60 return last;
61 }
62
63-
64 void uv_barrier_destroy(uv_barrier_t* barrier) {
65 struct _uv_barrier* b;
66
67diff --git a/src/uv-common.c b/src/uv-common.c
68index 49026c03..c9a32c03 100644
69--- a/src/uv-common.c
70+++ b/src/uv-common.c
71@@ -758,6 +758,7 @@ void uv__fs_readdir_cleanup(uv_fs_t* req) {
72 }
73 }
74
75+
76 #ifdef __clang__
77 # pragma clang diagnostic push
78 # pragma clang diagnostic ignored "-Wvarargs"
79diff --git a/src/win/process.c b/src/win/process.c
80index a49016f6..8e7835a5 100644
81--- a/src/win/process.c
82+++ b/src/win/process.c
83@@ -35,7 +35,6 @@
84 #include "handle-inl.h"
85 #include "req-inl.h"
86
87-
88 #define SIGKILL 9
89
90
91diff --git a/src/win/winsock.c b/src/win/winsock.c
92index 7843e9f1..cda82bc3 100644
93--- a/src/win/winsock.c
94+++ b/src/win/winsock.c
95@@ -25,6 +25,7 @@
96 #include "uv.h"
97 #include "internal.h"
98
99+
100 #pragma comment(lib, "Ws2_32.lib")
101
102 /* Whether there are any non-IFS LSPs stacked on TCP */