Skip to content

This error #2

Description

@muhammetfaik

I run this code $gcc -I ./lib/ -c ./lib/error_functions.c this error:

   ./lib/error_functions.c:19:1: error: expected ‘,’ or ‘;’ before ‘__attribute__’
  19 | __attribute__ ((__noreturn__))
     | ^~~~~~~~~~~~~
./lib/error_functions.c: In function ‘errExit’:
./lib/error_functions.c:88:5: warning: implicit declaration of function ‘terminate’ [-Wimplicit-function-declaration]
  88 |     terminate(TRUE);
     |     ^~~~~~~~~
./lib/error_functions.c: In function ‘outputError’:
./lib/error_functions.c:56:35: warning: ‘%s’ directive output may be truncated writing up to 499 bytes into a region of size 495 [-Wformat-truncation=]
  56 |     snprintf(buf, BUF_SIZE, "ERROR%s %s\n", errText, userMsg);
     |                                   ^~        ~~~~~~~
./lib/error_functions.c:56:5: note: ‘snprintf’ output between 8 and 1006 bytes into a destination of size 500
  56 |     snprintf(buf, BUF_SIZE, "ERROR%s %s\n", errText, userMsg);
     |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./lib/error_functions.c: In function ‘errExit’:
./lib/error_functions.c:89:1: warning: ‘noreturn’ function does return
  89 | }
     | ^
./lib/error_functions.c: In function ‘err_exit’:
./lib/error_functions.c:101:1: warning: ‘noreturn’ function does return
 101 | }
     | ^
./lib/error_functions.c: In function ‘errExitEN’:
./lib/error_functions.c:113:1: warning: ‘noreturn’ function does return
 113 | }
     | ^
./lib/error_functions.c: In function ‘fatal’:
./lib/error_functions.c:125:1: warning: ‘noreturn’ function does return
 125 | }
     | ^
   

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions