diff options
-rw-r--r-- | Process.c | 2 | ||||
-rw-r--r-- | Process.h | 2 | ||||
-rw-r--r-- | pcp/PCPProcess.c | 4 |
3 files changed, 4 insertions, 4 deletions
@@ -789,7 +789,7 @@ void Process_printLeftAlignedField(RichString* str, int attr, const char* conten RichString_appendChr(str, attr, ' ', width + 1 - columns); } -void Process_printPercentage(float val, char* buffer, int n, uint8_t width, int* attr) { +void Process_printPercentage(float val, char* buffer, size_t n, uint8_t width, int* attr) { if (val >= 0) { if (val < 0.05F) *attr = CRT_colors[PROCESS_SHADOW]; @@ -380,7 +380,7 @@ void Process_fillStarttimeBuffer(Process* this); void Process_printLeftAlignedField(RichString* str, int attr, const char* content, unsigned int width); -void Process_printPercentage(float val, char* buffer, int n, uint8_t width, int* attr); +void Process_printPercentage(float val, char* buffer, size_t n, uint8_t width, int* attr); void Process_display(const Object* cast, RichString* out); diff --git a/pcp/PCPProcess.c b/pcp/PCPProcess.c index cefd0ac3..5e025a1c 100644 --- a/pcp/PCPProcess.c +++ b/pcp/PCPProcess.c @@ -103,7 +103,7 @@ void Process_delete(Object* cast) { free(this); } -static void PCPProcess_printDelay(float delay_percent, char* buffer, int n) { +static void PCPProcess_printDelay(float delay_percent, char* buffer, size_t n) { if (isnan(delay_percent)) { xSnprintf(buffer, n, " N/A "); } else { @@ -116,7 +116,7 @@ static void PCPProcess_writeField(const Process* this, RichString* str, ProcessF bool coloring = this->host->settings->highlightMegabytes; char buffer[256]; buffer[255] = '\0'; int attr = CRT_colors[DEFAULT_COLOR]; - int n = sizeof(buffer) - 1; + size_t n = sizeof(buffer) - 1; switch ((int)field) { case CMINFLT: Process_printCount(str, pp->cminflt, coloring); return; case CMAJFLT: Process_printCount(str, pp->cmajflt, coloring); return; |