$ ./build.sh
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for one of the modules 'ncurses'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stu/projects/external/cfiles
[1/2] Building C object CMakeFiles/cfiles.dir/cf.c.o
cf.c:131:6: warning: no previous declaration for ‘init’ [-Wmissing-declarations]
void init()
^~~~
cf.c:168:6: warning: no previous declaration for ‘curses_init’ [-Wmissing-declarations]
void curses_init()
^~~~~~~~~~~
cf.c:184:5: warning: no previous declaration for ‘is_regular_file’ [-Wmissing-declarations]
int is_regular_file(const char *path)
^~~~~~~~~~~~~~~
cf.c:195:5: warning: no previous declaration for ‘fileExists’ [-Wmissing-declarations]
int fileExists(char *file)
^~~~~~~~~~
cf.c:207:6: warning: no previous declaration for ‘getLastToken’ [-Wmissing-declarations]
void getLastToken(char *tokenizer)
^~~~~~~~~~~~
cf.c:221:5: warning: no previous declaration for ‘getNumberOfBookmarks’ [-Wmissing-declarations]
int getNumberOfBookmarks()
^~~~~~~~~~~~~~~~~~~~
cf.c:242:6: warning: no previous declaration for ‘displayBookmarks’ [-Wmissing-declarations]
void displayBookmarks()
^~~~~~~~~~~~~~~~
cf.c:261:6: warning: no previous declaration for ‘openBookmarkDir’ [-Wmissing-declarations]
void openBookmarkDir(char secondKey)
^~~~~~~~~~~~~~~
cf.c:285:5: warning: no previous declaration for ‘bookmarkExists’ [-Wmissing-declarations]
int bookmarkExists(char bookmark)
^~~~~~~~~~~~~~
cf.c:309:6: warning: no previous declaration for ‘addBookmark’ [-Wmissing-declarations]
void addBookmark(char bookmark, char *path)
^~~~~~~~~~~
cf.c:320:9: warning: no previous declaration for ‘create_newwin’ [-Wmissing-declarations]
WINDOW *create_newwin(int height, int width, int starty, int startx)
^~~~~~~~~~~~~
cf.c: In function ‘create_newwin’:
cf.c:320:50: warning: declaration of ‘starty’ shadows a global declaration [-Wshadow]
WINDOW *create_newwin(int height, int width, int starty, int startx)
~~~~^~~~~~
cf.c:120:13: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~~~
cf.c:320:62: warning: declaration of ‘startx’ shadows a global declaration [-Wshadow]
WINDOW *create_newwin(int height, int width, int starty, int startx)
~~~~^~~~~~
cf.c:120:5: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~~~
cf.c: At top level:
cf.c:331:5: warning: no previous declaration for ‘compare’ [-Wmissing-declarations]
int compare (const void * a, const void * b )
^~~~~~~
cf.c:353:6: warning: no previous declaration for ‘getMIME’ [-Wmissing-declarations]
void getMIME(char *filepath, char mime[10])
^~~~~~~
cf.c:373:6: warning: no previous declaration for ‘openFile’ [-Wmissing-declarations]
void openFile(char *filepath)
^~~~~~~~
cf.c:398:5: warning: no previous declaration for ‘checkClipboard’ [-Wmissing-declarations]
int checkClipboard(char *filepath)
^~~~~~~~~~~~~~
cf.c:423:6: warning: no previous declaration for ‘writeClipboard’ [-Wmissing-declarations]
void writeClipboard(char *filepath)
^~~~~~~~~~~~~~
cf.c:440:6: warning: no previous declaration for ‘removeClipboard’ [-Wmissing-declarations]
void removeClipboard(char *filepath)
^~~~~~~~~~~~~~~
cf.c:452:6: warning: no previous declaration for ‘emptyClipboard’ [-Wmissing-declarations]
void emptyClipboard()
^~~~~~~~~~~~~~
cf.c:464:6: warning: no previous declaration for ‘getImgPreview’ [-Wmissing-declarations]
void getImgPreview(char *filepath, int maxy, int maxx)
^~~~~~~~~~~~~
cf.c: In function ‘getImgPreview’:
cf.c:464:40: warning: declaration of ‘maxy’ shadows a global declaration [-Wshadow]
void getImgPreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:27: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c:464:50: warning: declaration of ‘maxx’ shadows a global declaration [-Wshadow]
void getImgPreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:21: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c: At top level:
cf.c:519:6: warning: no previous declaration for ‘getTextPreview’ [-Wmissing-declarations]
void getTextPreview(char *filepath, int maxy, int maxx)
^~~~~~~~~~~~~~
cf.c: In function ‘getTextPreview’:
cf.c:519:41: warning: declaration of ‘maxy’ shadows a global declaration [-Wshadow]
void getTextPreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:27: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c:519:51: warning: declaration of ‘maxx’ shadows a global declaration [-Wshadow]
void getTextPreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:21: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c: At top level:
cf.c:546:6: warning: no previous declaration for ‘getVidPreview’ [-Wmissing-declarations]
void getVidPreview(char *filepath, int maxy, int maxx)
^~~~~~~~~~~~~
cf.c: In function ‘getVidPreview’:
cf.c:546:40: warning: declaration of ‘maxy’ shadows a global declaration [-Wshadow]
void getVidPreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:27: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c:546:50: warning: declaration of ‘maxx’ shadows a global declaration [-Wshadow]
void getVidPreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:21: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c: At top level:
cf.c:562:6: warning: no previous declaration for ‘getArchivePreview’ [-Wmissing-declarations]
void getArchivePreview(char *filepath, int maxy, int maxx)
^~~~~~~~~~~~~~~~~
cf.c: In function ‘getArchivePreview’:
cf.c:562:44: warning: declaration of ‘maxy’ shadows a global declaration [-Wshadow]
void getArchivePreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:27: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c:562:54: warning: declaration of ‘maxx’ shadows a global declaration [-Wshadow]
void getArchivePreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:21: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c:564:10: warning: unused variable ‘buf’ [-Wunused-variable]
char buf[250];
^~~
cf.c: At top level:
cf.c:575:6: warning: no previous declaration for ‘getDummyVidPreview’ [-Wmissing-declarations]
void getDummyVidPreview(char *filepath, int maxy, int maxx)
^~~~~~~~~~~~~~~~~~
cf.c: In function ‘getDummyVidPreview’:
cf.c:575:45: warning: declaration of ‘maxy’ shadows a global declaration [-Wshadow]
void getDummyVidPreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:27: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c:575:55: warning: declaration of ‘maxx’ shadows a global declaration [-Wshadow]
void getDummyVidPreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:21: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c: At top level:
cf.c:586:6: warning: no previous declaration for ‘getFileType’ [-Wmissing-declarations]
void getFileType(char *filepath)
^~~~~~~~~~~
cf.c: In function ‘getFileType’:
cf.c:589:18: warning: passing argument 1 of ‘getLastToken’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
getLastToken(".");
^~~
cf.c:207:25: note: expected ‘char *’ but argument is of type ‘const char *’
void getLastToken(char *tokenizer)
~~~~~~^~~~~~~~~
cf.c: At top level:
cf.c:596:6: warning: no previous declaration for ‘getPreview’ [-Wmissing-declarations]
void getPreview(char *filepath, int maxy, int maxx)
^~~~~~~~~~
cf.c: In function ‘getPreview’:
cf.c:596:37: warning: declaration of ‘maxy’ shadows a global declaration [-Wshadow]
void getPreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:27: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c:596:47: warning: declaration of ‘maxx’ shadows a global declaration [-Wshadow]
void getPreview(char *filepath, int maxy, int maxx)
~~~~^~~~
cf.c:120:21: note: shadowed declaration is here
int startx, starty, maxx, maxy;
^~~~
cf.c: At top level:
cf.c:616:6: warning: no previous declaration for ‘getParentPath’ [-Wmissing-declarations]
void getParentPath(char *path)
^~~~~~~~~~~~~
cf.c:633:5: warning: no previous declaration for ‘getNumberofFiles’ [-Wmissing-declarations]
int getNumberofFiles(char* directory)
^~~~~~~~~~~~~~~~
cf.c: In function ‘getNumberofFiles’:
cf.c:635:9: warning: declaration of ‘len’ shadows a global declaration [-Wshadow]
int len=0;
^~~
cf.c:32:5: note: shadowed declaration is here
int len=0;
^~~
cf.c: At top level:
cf.c:662:5: warning: no previous declaration for ‘getFiles’ [-Wmissing-declarations]
int getFiles(char* directory, char* target[])
^~~~~~~~
cf.c: In function ‘getFiles’:
cf.c:664:9: warning: declaration of ‘i’ shadows a global declaration [-Wshadow]
int i = 0;
^
cf.c:44:5: note: shadowed declaration is here
int i = 0;
^
cf.c: At top level:
cf.c:692:6: warning: no previous declaration for ‘copyFiles’ [-Wmissing-declarations]
void copyFiles(char *present_dir)
^~~~~~~~~
cf.c: In function ‘copyFiles’:
cf.c:697:9: warning: unused variable ‘status’ [-Wunused-variable]
int status;
^~~~~~
cf.c:696:11: warning: unused variable ‘pid’ [-Wunused-variable]
pid_t pid;
^~~
cf.c: At top level:
cf.c:716:6: warning: no previous declaration for ‘removeFiles’ [-Wmissing-declarations]
void removeFiles()
^~~~~~~~~~~
cf.c:740:6: warning: no previous declaration for ‘renameFiles’ [-Wmissing-declarations]
void renameFiles()
^~~~~~~~~~~
cf.c:798:6: warning: no previous declaration for ‘moveFiles’ [-Wmissing-declarations]
void moveFiles(char *present_dir)
^~~~~~~~~
cf.c: In function ‘moveFiles’:
cf.c:802:9: warning: unused variable ‘status’ [-Wunused-variable]
int status;
^~~~~~
cf.c: At top level:
cf.c:823:6: warning: no previous declaration for ‘init_windows’ [-Wmissing-declarations]
void init_windows()
^~~~~~~~~~~~
cf.c:834:6: warning: no previous declaration for ‘displayStatus’ [-Wmissing-declarations]
void displayStatus()
^~~~~~~~~~~~~
cf.c:851:6: warning: no previous declaration for ‘displayAlert’ [-Wmissing-declarations]
void displayAlert(char *message)
^~~~~~~~~~~~
cf.c:863:6: warning: no previous declaration for ‘refreshWindows’ [-Wmissing-declarations]
void refreshWindows()
^~~~~~~~~~~~~~
cf.c:878:6: warning: no previous declaration for ‘handleFlags’ [-Wmissing-declarations]
void handleFlags(char** directories)
^~~~~~~~~~~
cf.c: In function ‘main’:
cf.c:1134:30: warning: passing argument 1 of ‘getLastToken’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
getLastToken("/");
^~~
cf.c:207:25: note: expected ‘char *’ but argument is of type ‘const char *’
void getLastToken(char *tokenizer)
~~~~~~^~~~~~~~~
cf.c:1187:30: warning: passing argument 1 of ‘getLastToken’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
getLastToken("/");
^~~
cf.c:207:25: note: expected ‘char *’ but argument is of type ‘const char *’
void getLastToken(char *tokenizer)
~~~~~~^~~~~~~~~
cf.c:1210:30: warning: passing argument 1 of ‘getLastToken’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
getLastToken("/");
^~~
cf.c:207:25: note: expected ‘char *’ but argument is of type ‘const char *’
void getLastToken(char *tokenizer)
~~~~~~^~~~~~~~~
cf.c:1278:38: warning: passing argument 1 of ‘displayAlert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
displayAlert("Confirm (y/n): ");
^~~~~~~~~~~~~~~~~
cf.c:851:25: note: expected ‘char *’ but argument is of type ‘const char *’
void displayAlert(char *message)
~~~~~~^~~~~~~
cf.c:1284:42: warning: passing argument 1 of ‘displayAlert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
displayAlert("ABORTED");
^~~~~~~~~
cf.c:851:25: note: expected ‘char *’ but argument is of type ‘const char *’
void displayAlert(char *message)
~~~~~~^~~~~~~
cf.c:1291:34: warning: passing argument 1 of ‘displayAlert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
displayAlert("Select some files first!");
^~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:851:25: note: expected ‘char *’ but argument is of type ‘const char *’
void displayAlert(char *message)
~~~~~~^~~~~~~
cf.c:1301:34: warning: passing argument 1 of ‘displayAlert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
displayAlert("No Bookmarks Found!");
^~~~~~~~~~~~~~~~~~~~~
cf.c:851:25: note: expected ‘char *’ but argument is of type ‘const char *’
void displayAlert(char *message)
~~~~~~^~~~~~~
cf.c:1316:30: warning: passing argument 1 of ‘displayAlert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
displayAlert("Enter Bookmark Key");
^~~~~~~~~~~~~~~~~~~~
cf.c:851:25: note: expected ‘char *’ but argument is of type ‘const char *’
void displayAlert(char *message)
~~~~~~^~~~~~~
cf.c:1320:34: warning: passing argument 1 of ‘displayAlert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
displayAlert("Bookmark Key Exists!");
^~~~~~~~~~~~~~~~~~~~~~
cf.c:851:25: note: expected ‘char *’ but argument is of type ‘const char *’
void displayAlert(char *message)
~~~~~~^~~~~~~
cf.c:1340:34: warning: passing argument 1 of ‘displayAlert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
displayAlert("Selection List is Empty!");
^~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:851:25: note: expected ‘char *’ but argument is of type ‘const char *’
void displayAlert(char *message)
~~~~~~^~~~~~~
cf.c:1356:34: warning: passing argument 1 of ‘displayAlert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
displayAlert("Selection List is Empty!");
^~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:851:25: note: expected ‘char *’ but argument is of type ‘const char *’
void displayAlert(char *message)
~~~~~~^~~~~~~
cf.c:1381:34: warning: passing argument 1 of ‘displayAlert’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
displayAlert("No scripts found!");
^~~~~~~~~~~~~~~~~~~
cf.c:851:25: note: expected ‘char *’ but argument is of type ‘const char *’
void displayAlert(char *message)
~~~~~~^~~~~~~
cf.c:1399:30: warning: declaration of ‘cmd’ shadows a previous local [-Wshadow]
char cmd[250];
^~~
cf.c:1064:14: note: shadowed declaration is here
char cmd[250];
^~~
cf.c:1400:30: warning: declaration of ‘path’ shadows a previous local [-Wshadow]
char path[250];
^~~~
cf.c:1182:22: note: shadowed declaration is here
char path[250];
^~~~
cf.c:950:13: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
int status;
^~~~~~
cf.c: In function ‘init’:
cf.c:146:31: warning: ‘/clipboard’ directive writing 10 bytes into a region of size between 1 and 250 [-Wformat-overflow=]
sprintf(clipboard_path,"%s/clipboard",cache_path);
^~~~~~~~~~
cf.c:146:5: note: ‘sprintf’ output between 11 and 260 bytes into a destination of size 250
sprintf(clipboard_path,"%s/clipboard",cache_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:148:31: warning: ‘/bookmarks’ directive writing 10 bytes into a region of size between 1 and 250 [-Wformat-overflow=]
sprintf(bookmarks_path,"%s/bookmarks",cache_path);
^~~~~~~~~~
cf.c:148:5: note: ‘sprintf’ output between 11 and 260 bytes into a destination of size 250
sprintf(bookmarks_path,"%s/bookmarks",cache_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:150:29: warning: ‘/scripts’ directive writing 8 bytes into a region of size between 1 and 250 [-Wformat-overflow=]
sprintf(scripts_path,"%s/scripts",cache_path);
^~~~~~~~
cf.c:150:5: note: ‘sprintf’ output between 9 and 258 bytes into a destination of size 250
sprintf(scripts_path,"%s/scripts",cache_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:152:36: warning: ‘/clipboard.tmp’ directive writing 14 bytes into a region of size between 1 and 250 [-Wformat-overflow=]
sprintf(temp_clipboard_path,"%s/clipboard.tmp",cache_path);
^~~~~~~~~~~~~~
cf.c:152:5: note: ‘sprintf’ output between 15 and 264 bytes into a destination of size 250
sprintf(temp_clipboard_path,"%s/clipboard.tmp",cache_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c: In function ‘compare’:
cf.c:338:34: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
sprintf(temp_filepath1,"%s/%s", sort_dir, *(char **)a);
^
cf.c:338:5: note: ‘sprintf’ output 2 or more bytes (assuming 251) into a destination of size 250
sprintf(temp_filepath1,"%s/%s", sort_dir, *(char **)a);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:339:34: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
sprintf(temp_filepath2,"%s/%s", sort_dir, *(char **)b);
^
cf.c:339:5: note: ‘sprintf’ output 2 or more bytes (assuming 251) into a destination of size 250
sprintf(temp_filepath2,"%s/%s", sort_dir, *(char **)b);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c: In function ‘removeClipboard’:
cf.c:444:36: warning: ‘%s’ directive writing up to 249 bytes into a region of size 235 [-Wformat-overflow=]
sprintf(cmd,"sed -i '\\|^%s|d' %s", filepath, clipboard_path);
^~ ~~~~~~~~~~~~~~
cf.c:444:5: note: ‘sprintf’ output 16 or more bytes (assuming 265) into a destination of size 250
sprintf(cmd,"sed -i '\\|^%s|d' %s", filepath, clipboard_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c: In function ‘getVidPreview’:
cf.c:552:25: warning: ‘/preview’ directive writing 8 bytes into a region of size between 1 and 250 [-Wformat-overflow=]
sprintf(temp_dir,"%s/preview",cache_path);
^~~~~~~~
cf.c:552:5: note: ‘sprintf’ output between 9 and 258 bytes into a destination of size 250
sprintf(temp_dir,"%s/preview",cache_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:553:24: warning: ‘%s’ directive writing up to 249 bytes into a region of size 245 [-Wformat-overflow=]
sprintf(buf, "less %s", temp_dir);
^~ ~~~~~~~~
cf.c:553:5: note: ‘sprintf’ output between 6 and 255 bytes into a destination of size 250
sprintf(buf, "less %s", temp_dir);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c: In function ‘getArchivePreview’:
cf.c:567:25: warning: ‘/preview’ directive writing 8 bytes into a region of size between 1 and 250 [-Wformat-overflow=]
sprintf(temp_dir,"%s/preview",cache_path);
^~~~~~~~
cf.c:567:5: note: ‘sprintf’ output between 9 and 258 bytes into a destination of size 250
sprintf(temp_dir,"%s/preview",cache_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c: In function ‘copyFiles’:
cf.c:706:38: warning: ‘%s’ directive writing up to 249 bytes into a region of size 240 [-Wformat-overflow=]
sprintf(temp_dir,"cp -r -v \"%s\" \"%s\"",buf,present_dir);
^~ ~~~
cf.c:706:9: note: ‘sprintf’ output 15 or more bytes (assuming 264) into a destination of size 250
sprintf(temp_dir,"cp -r -v \"%s\" \"%s\"",buf,present_dir);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c: In function ‘removeFiles’:
cf.c:728:38: warning: ‘%s’ directive writing up to 249 bytes into a region of size 240 [-Wformat-overflow=]
sprintf(temp_dir,"rm -r -v \"%s\"",buf);
^~ ~~~
cf.c:728:9: note: ‘sprintf’ output between 12 and 261 bytes into a destination of size 250
sprintf(temp_dir,"rm -r -v \"%s\"",buf);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c: In function ‘renameFiles’:
cf.c:758:21: warning: ‘%s’ directive writing up to 249 bytes into a region of size 247 [-Wformat-overflow=]
sprintf(cmd,"cp %s %s",clipboard_path,temp_clipboard_path);
^~ ~~~~~~~~~~~~~~
cf.c:758:5: note: ‘sprintf’ output between 5 and 503 bytes into a destination of size 250
sprintf(cmd,"cp %s %s",clipboard_path,temp_clipboard_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:762:22: warning: ‘%s’ directive writing up to 249 bytes into a region of size 246 [-Wformat-overflow=]
sprintf(cmd,"vim %s",temp_clipboard_path);
^~ ~~~~~~~~~~~~~~~~~~~
cf.c:762:5: note: ‘sprintf’ output between 5 and 254 bytes into a destination of size 250
sprintf(cmd,"vim %s",temp_clipboard_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:788:21: warning: ‘%s’ directive writing up to 249 bytes into a region of size 247 [-Wformat-overflow=]
sprintf(cmd,"rm %s %s",temp_clipboard_path,clipboard_path);
^~ ~~~~~~~~~~~~~~~~~~~
cf.c:788:5: note: ‘sprintf’ output between 5 and 503 bytes into a destination of size 250
sprintf(cmd,"rm %s %s",temp_clipboard_path,clipboard_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:779:35: warning: ‘%s’ directive writing up to 249 bytes into a region of size 246 [-Wformat-overflow=]
sprintf(cmd,"mv \"%s\" \"%s\"",buf,buf2);
^~ ~~~
cf.c:779:17: note: ‘sprintf’ output between 9 and 507 bytes into a destination of size 250
sprintf(cmd,"mv \"%s\" \"%s\"",buf,buf2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c: In function ‘moveFiles’:
cf.c:811:35: warning: ‘%s’ directive writing up to 249 bytes into a region of size 243 [-Wformat-overflow=]
sprintf(temp_dir,"mv -f \"%s\" \"%s\"",buf,present_dir);
^~ ~~~
cf.c:811:9: note: ‘sprintf’ output 12 or more bytes (assuming 261) into a destination of size 250
sprintf(temp_dir,"mv -f \"%s\" \"%s\"",buf,present_dir);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c: In function ‘main’:
cf.c:1035:45: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
sprintf(temp_dir, "%s/%s", next_dir, next_directories[i]);
^
cf.c:1035:21: note: ‘sprintf’ output 2 or more bytes (assuming 251) into a destination of size 250
sprintf(temp_dir, "%s/%s", next_dir, next_directories[i]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:1401:49: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
sprintf(temp_dir, "%s/%s", scripts_path, scripts[option]);
^
cf.c:1401:25: note: ‘sprintf’ output 2 or more bytes (assuming 251) into a destination of size 250
sprintf(temp_dir, "%s/%s", scripts_path, scripts[option]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:1403:42: warning: ‘%s’ directive writing up to 249 bytes into a region of size between 0 and 249 [-Wformat-overflow=]
sprintf(cmd, "%s %s", temp_dir, path);
^~ ~~~~
cf.c:1403:25: note: ‘sprintf’ output between 2 and 500 bytes into a destination of size 250
sprintf(cmd, "%s %s", temp_dir, path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:1208:37: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
sprintf(path, "%s/%s",info->pw_dir,buf);
^
cf.c:1208:17: note: ‘sprintf’ output 2 or more bytes (assuming 251) into a destination of size 250
sprintf(path, "%s/%s",info->pw_dir,buf);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:1349:43: warning: ‘%s’ directive writing up to 249 bytes into a region of size 246 [-Wformat-overflow=]
sprintf(temp_dir,"vim %s",clipboard_path);
^~ ~~~~~~~~~~~~~~
cf.c:1349:21: note: ‘sprintf’ output between 5 and 254 bytes into a destination of size 250
sprintf(temp_dir,"vim %s",clipboard_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:1183:37: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
sprintf(path, "%s/%s",info->pw_dir,buf);
^
cf.c:1183:17: note: ‘sprintf’ output 2 or more bytes (assuming 251) into a destination of size 250
sprintf(path, "%s/%s",info->pw_dir,buf);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf.c:1333:44: warning: ‘%s’ directive writing up to 249 bytes into a region of size 245 [-Wformat-overflow=]
sprintf(temp_dir,"less %s",clipboard_path);
^~ ~~~~~~~~~~~~~~
cf.c:1333:21: note: ‘sprintf’ output between 6 and 255 bytes into a destination of size 250
sprintf(temp_dir,"less %s",clipboard_path);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2/2] Linking C executable cfiles