Skip to content

Commit 874e0b2

Browse files
committed
fix(msvc): Fix C4138 warning by adding space before commented parameter names
ISSUE: MSVC compiler reports warning C4138: '*/' found outside of comment for patterns like 'void */*p*/' where the pointer asterisk is immediately followed by a comment start. AFFECTED FILES: - include/libipc/mem/new.h (line 30) - src/libipc/platform/win/mutex.h (line 54) - src/libipc/platform/win/semaphore.h (line 53) CHANGES: Changed 'type */*param*/' to 'type * /*param*/' (added space before comment) Examples: - void */*p*/ → void * /*p*/ - char const */*name*/ → char const * /*name*/ This resolves the MSVC warning while maintaining code functionality and keeping the commented-out parameter names for documentation.
1 parent 52ff081 commit 874e0b2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/libipc/mem/new.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class LIBIPC_EXPORT block_collector {
2727
public:
2828
virtual ~block_collector() noexcept = default;
2929
virtual void *allocate(std::size_t /*bytes*/) noexcept = 0;
30-
virtual void deallocate(void */*p*/, std::size_t /*bytes*/) noexcept = 0;
30+
virtual void deallocate(void * /*p*/, std::size_t /*bytes*/) noexcept = 0;
3131
};
3232

3333
/// \brief Matches the appropriate memory block resource based on a specified size.

src/libipc/platform/win/mutex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class mutex {
5555
close();
5656
}
5757

58-
static void clear_storage(char const */*name*/) noexcept {
58+
static void clear_storage(char const * /*name*/) noexcept {
5959
}
6060

6161
bool lock(std::uint64_t tm) noexcept {

src/libipc/platform/win/semaphore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class semaphore {
5454
close();
5555
}
5656

57-
static void clear_storage(char const */*name*/) noexcept {
57+
static void clear_storage(char const * /*name*/) noexcept {
5858
}
5959

6060
bool wait(std::uint64_t tm) noexcept {

0 commit comments

Comments
 (0)