mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-01 13:10:43 +00:00
Make private functions static and add missing prototypes.
Fixes:
mongoose/mongoose.c:180:8: warning: no previous prototype for ‘mg_dns_parse_name’ [-Wmissing-prototypes]
180 | size_t mg_dns_parse_name(const uint8_t *s, size_t n, size_t ofs, char *dst,
| ^~~~~~~~~~~~~~~~~
mongoose/mongoose.c:306:6: warning: no previous prototype for ‘mg_dns_send’ [-Wmissing-prototypes]
306 | void mg_dns_send(struct mg_connection *c, const struct mg_str *name,
| ^~~~~~~~~~~
mongoose/mongoose.c:925:6: warning: no previous prototype for ‘mg_http_parse_headers’ [-Wmissing-prototypes]
925 | void mg_http_parse_headers(const char *s, const char *end,
| ^~~~~~~~~~~~~~~~~~~~~
mongoose/mongoose.c:1125:7: warning: no previous prototype for ‘mg_http_etag’ [-Wmissing-prototypes]
1125 | char *mg_http_etag(char *buf, size_t len, size_t size, time_t mtime) {
| ^~~~~~~~~~~~
mongoose/mongoose.c:2578:6: warning: no previous prototype for ‘mg_sha1_transform’ [-Wmissing-prototypes]
2578 | void mg_sha1_transform(uint32_t state[5], const unsigned char buffer[64]) {
| ^~~~~~~~~~~~~~~~~
mongoose/mongoose.c:2976:8: warning: no previous prototype for ‘mg_open_listener’ [-Wmissing-prototypes]
2976 | SOCKET mg_open_listener(const char *url, struct mg_addr *addr) {
| ^~~~~~~~~~~~~~~~
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
This commit is contained in:
1 parent
b5147a149e
commit
c11e5a9383
9 files changed
+18
-11
No files matched your search
+2
-1
@@ -172,7 +172,7 @@ struct mg_str *mg_http_get_header(struct mg_http_message *h, const char *name) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void mg_http_parse_headers(const char *s, const char *end,
|
||||
static void mg_http_parse_headers(const char *s, const char *end,
|
||||
struct mg_http_header *h, int max_headers) {
|
||||
int i;
|
||||
for (i = 0; i < max_headers; i++) {
|
||||
@@ -372,6 +372,7 @@ static void restore_http_cb(struct mg_connection *c) {
|
||||
c->pfn = http_cb;
|
||||
}
|
||||
|
||||
char *mg_http_etag(char *buf, size_t len, size_t size, time_t mtime);
|
||||
char *mg_http_etag(char *buf, size_t len, size_t size, time_t mtime) {
|
||||
snprintf(buf, len, "\"%lx." MG_INT64_FMT "\"", (unsigned long) mtime,
|
||||
(int64_t) size);
|
||||
|
||||
Reference in new issue
Block a user