From b0d1969ca5c4bdffdf5d3a3db9da179aa4e7175c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 22 Feb 2019 10:50:59 +0100 Subject: [PATCH] Userland: Fix two compiler warnings. --- Userland/chmod.cpp | 2 +- Userland/ls.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/chmod.cpp b/Userland/chmod.cpp index 7fb32e2fee..496762226d 100644 --- a/Userland/chmod.cpp +++ b/Userland/chmod.cpp @@ -10,7 +10,7 @@ int main(int argc, char **argv) return 1; } - mode_t mode; + unsigned mode; int rc = sscanf(argv[1], "%o", &mode); if (rc != 1) { perror("sscanf"); diff --git a/Userland/ls.cpp b/Userland/ls.cpp index 7ff875967b..ed1c48e855 100644 --- a/Userland/ls.cpp +++ b/Userland/ls.cpp @@ -111,7 +111,7 @@ int do_dir(const char* path) perror("opendir"); return 1; } - char pathbuf[256]; + char pathbuf[PATH_MAX]; while (auto* de = readdir(dirp)) { if (de->d_name[0] == '.' && !flag_show_dotfiles)