Skip to content

Commit

Permalink
fix format bug on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
hnwyllmm committed Nov 14, 2024
1 parent 9229df6 commit 86b5f12
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deps/common/log/backtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ See the Mulan PSL v2 for more details. */
#include <stdint.h>
#include <stdio.h>
#include <execinfo.h>
#include <inttypes.h>
#include "common/lang/vector.h"

namespace common {
Expand Down Expand Up @@ -63,7 +64,7 @@ int ProcMap::parse_file(const char *file_name)

while (fgets(line, sizeof(line), fp) != nullptr) {

int ret = sscanf(line, "%lx-%lx %4s %lx %lx:%lx %ld %255s",
int ret = sscanf(line, "%" PRIx64 "-%" PRIx64 " %4s %" PRIx64 " %" PRIx64 ":%" PRIx64 "%" PRIu64 "%255s",
&start, &end, perms, &offset, &major, &minor, &inode, path);
if (ret < 8 || perms[2] != 'x') {
continue;
Expand Down

0 comments on commit 86b5f12

Please sign in to comment.