Browse Source

Add format string attributes

Georgi Chorbadzhiyski 3 years ago
parent
commit
8fcac8dd4d
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      http_response.h
  2. 1
    1
      io.h

+ 1
- 1
http_response.h View File

@@ -20,7 +20,7 @@ void send_header_textplain(int clientsock);
20 20
 
21 21
 void send_http_error(int clientsock, const char *code, const char *message);
22 22
 void send_http_ok(int clientsock, const char *message);
23
-void send_http_ok_msg(int clientsock, const char *fmt, ...);
23
+void send_http_ok_msg(int clientsock, const char *fmt, ...) __attribute__ ((format(printf, 2, 3)));
24 24
 
25 25
 void send_200_ok(int clientsock);
26 26
 void send_302_redirect(int clientsock, const char * url);

+ 1
- 1
io.h View File

@@ -29,7 +29,7 @@ ssize_t fdread_nowaitfull(int fd, char *buf, size_t buf_size);
29 29
 ssize_t fdwrite(int fd, char *buf, size_t buf_size);
30 30
 
31 31
 int fdputs(int fd, char *msg);
32
-int fdputsf(int fd, char *fmt, ...);
32
+int fdputsf(int fd, char *fmt, ...) __attribute__ ((format(printf, 2, 3)));
33 33
 
34 34
 void set_log_io_errors(int report_io_errors);
35 35
 

Loading…
Cancel
Save