From 88cc33e2497b4a23bdcb639fefeaea7474e77d19 Mon Sep 17 00:00:00 2001 From: dam Date: Wed, 2 Nov 2022 01:25:21 +0000 Subject: Added compiler flags descriptions. --- main.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index b4756f0..1dc2ac0 100644 --- a/main.c +++ b/main.c @@ -1,19 +1,20 @@ // Compilation command: // - release dynamics libs : gcc main.c -lncursesw -ltinfo -o ttt -Wall -Werror -pedantic -O2 -m64 -s // - release static libs : gcc main.c -lncursesw -ltinfo -o ttt -Wall -Werror -pedantic -O2 -m64 -s -static-pie -// - debug : gcc main.c -lncursesw -ltinfo -o ttt -Wall -Werror -pedantic -g3 -m64 -D DEBUG +// - debug : gcc main.c -lncursesw -ltinfo -o ttt -Wall -Werror -pedantic -g3 -m64 // // Compiler flags: // -l : libraries to link // -o : output file name -// -Wall : TODO -// -Werror : TODO -// -pedantic : TODO -// -O : code optimization level -// -g : TODO +// -Wall : enables all compiler's warning messages +// -Werror : make all warnings into errors +// -pedantic : issue all the warnings demanded by strict ISO C +// -O : code optimization level (commonly accepted as best: 2) +// -g : debug information level (max: 3) // -m64 : 64b architecture // -D : defines for preprocessor // -static-pie : link statically producing an position-independent executable +// -DNDEBUG : remove assertions from code (not used) // // Usage hints: // - To change the app data path, overwride the environment variable HOME (USERPROFILE for windows users). @@ -263,7 +264,7 @@ task_st *get_selected_task(database_st *db) { // Returns success. bool create_task(database_st *db, task_st **task) { assert(db != NULL); - assert(task != NULL); + assert(task != NULL); if (db->count == MAX_DATABASE_TASKS) { fprintf(stderr, "Database reached maximum capacity.\n"); -- cgit v1.2.3