From e25b0394122714efc24317358f9c5a64c9af280b Mon Sep 17 00:00:00 2001 From: Michael Zhilin Date: Sun, 30 Nov 2025 12:29:29 +0300 Subject: [PATCH] [cosmetic] make clang happy - add gcno/gcda files into ignore list - make static variables where compiler suggests --- .gitignore | 2 ++ src/trace_session.c | 10 +++++----- src/uprobe_factory.c | 2 +- src/uprobe_message_buffer.c | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 706fa09..227f87c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,7 @@ third_party *.bc *.o *.so +*.gcda +*.gcno node_names.h tests/__pycache__ diff --git a/src/trace_session.c b/src/trace_session.c index e71c3a8..3f39603 100644 --- a/src/trace_session.c +++ b/src/trace_session.c @@ -41,14 +41,14 @@ static ExecutorStart_hook_type prev_ExecutorStart_hook = NULL; static ExecutorFinish_hook_type prev_ExecutorFinish_hook = NULL; static ProcessUtility_hook_type prev_ProcessUtility_hook = NULL; -bool isExecuteTime = false; +bool isExecuteTime = false; -int ExecutorRunNestLevel = 0; +static int ExecutorRunNestLevel = 0; /* GUC parametrs */ -int writeMode = JSON_WRITE_MODE; -bool traceLWLocksForEachNode = true; -bool writeOnlySleepLWLocksStat = true; +int writeMode = JSON_WRITE_MODE; +static bool traceLWLocksForEachNode = true; +static bool writeOnlySleepLWLocksStat = true; static const struct config_enum_entry writeModeOptions[] = { diff --git a/src/uprobe_factory.c b/src/uprobe_factory.c index 11048de..d3fc283 100644 --- a/src/uprobe_factory.c +++ b/src/uprobe_factory.c @@ -17,7 +17,7 @@ typedef struct UprobeFactoryEntry } UprobeFactoryEntry; -UprobeFactoryEntry staticEntries[] = { +static UprobeFactoryEntry staticEntries[] = { { .interfaceInit = UprobeAttachTimeInit, .storageInit = UprobeStorageTimeInit, diff --git a/src/uprobe_message_buffer.c b/src/uprobe_message_buffer.c index d79ecc7..7b912b4 100644 --- a/src/uprobe_message_buffer.c +++ b/src/uprobe_message_buffer.c @@ -21,7 +21,7 @@ typedef struct MessageBuffer } MessageBuffer; -MessageBuffer *messageBuffer; +static MessageBuffer *messageBuffer; static bool WaitUntillMessageBufferHasSpace(void);