diff options
| author | dam <dam@gudinoff> | 2022-11-02 01:25:21 +0000 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2022-11-02 01:25:21 +0000 |
| commit | 88cc33e2497b4a23bdcb639fefeaea7474e77d19 (patch) | |
| tree | 08968d4cf82e97f8524e45621554d3446ce8b567 | |
| parent | 4b0f25ca86c6c5d14d414a7ac8ccf2fa52460f1b (diff) | |
| download | task-time-tracker-88cc33e2497b4a23bdcb639fefeaea7474e77d19.tar.zst task-time-tracker-88cc33e2497b4a23bdcb639fefeaea7474e77d19.zip | |
Added compiler flags descriptions.
| -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"); |
