Skip to content

Commit

Permalink
core/logging: fixup -Wformat-signedness
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx committed Dec 26, 2023
1 parent bb5392f commit 42c9521
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ void uwsgi_logit_simple(struct wsgi_request *wsgi_req) {
}

if (uwsgi.logging_options.memory_report) {
rlen = snprintf(mempkt, 4096, "{address space usage: %lld bytes/%lluMB} {rss usage: %llu bytes/%lluMB} ",
rlen = snprintf(mempkt, 4096, "{address space usage: %llu bytes/%lluMB} {rss usage: %llu bytes/%lluMB} ",
(unsigned long long) uwsgi.workers[uwsgi.mywid].vsz_size,
(unsigned long long) uwsgi.workers[uwsgi.mywid].vsz_size / 1024 / 1024,
(unsigned long long) uwsgi.workers[uwsgi.mywid].rss_size,
Expand Down Expand Up @@ -772,7 +772,7 @@ void get_memusage(uint64_t * rss, uint64_t * vsz) {
int i;
procfile = fopen("/proc/self/stat", "r");
if (procfile) {
i = fscanf(procfile, "%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %llu %lld", (unsigned long long *) vsz, (unsigned long long *) rss);
i = fscanf(procfile, "%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %llu %llu", (unsigned long long *) vsz, (unsigned long long *) rss);
if (i != 2) {
uwsgi_log("warning: invalid record in /proc/self/stat\n");
} else {
Expand All @@ -786,7 +786,7 @@ void get_memusage(uint64_t * rss, uint64_t * vsz) {
int i;
procfile = fopen("/proc/self/stat", "r");
if (procfile) {
i = fscanf(procfile, "%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %llu %lld", (unsigned long long *) vsz, (unsigned long long *) rss);
i = fscanf(procfile, "%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %llu %llu", (unsigned long long *) vsz, (unsigned long long *) rss);
if (i != 2) {
uwsgi_log("warning: invalid record in /proc/self/stat\n");
}
Expand Down
1 change: 1 addition & 0 deletions uwsgiconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ def __init__(self, filename, mute=False):
'-I.',
'-Wall',
'-Werror',
'-Wformat-signedness',
'-Wno-error=deprecated-declarations',
'-D_LARGEFILE_SOURCE',
'-D_FILE_OFFSET_BITS=64'
Expand Down

0 comments on commit 42c9521

Please sign in to comment.