diff options
| -rw-r--r-- | main.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -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"); |
