kellabyte/Haywire — pull request #17 by schlosna (2013-05-09 02:38:57+00:00)
Title: Fix clang warnings

These changes fix several clang warnings when building on OS X.

* Ignore build artifacts from source control
* Fix several "warning: no newline at end of file [-Wnewline-eof]"
* Fix the following warnings:

```
src/haywire/http_request.c:32:9: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration]
free(context->request->url);
^

src/haywire/http_request.c:38:40: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)'
context->request = (http_request *)malloc(sizeof(http_request));
^
src/haywire/http_request.c:38:40: note: please include the header or explicitly provide a declaration for 'malloc'

src/haywire/http_server.c:16:39: warning: extra tokens at end of #include directive [-Wextra-tokens]
^
//
src/haywire/http_server.c:35:9: warning: unused variable 'i' [-Wunused-variable]
int i;
^

src/haywire/http_server.c:36:11: warning: unused variable 'value' [-Wunused-variable]
char *value;
^

src/haywire/http_server.c:109:20: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'ssize_t' (aka 'long')
[-Wsign-compare]
if (parsed < nread)
~~~~~~ ^ ~~~~~

src/haywire/http_server.c:145:18: warning: unused variable 'parser' [-Wunused-variable]
http_parser *parser = (http_parser *)req->data;

src/haywire/http_server.c:146:27: warning: unused variable 'context' [-Wunused-variable]
http_request_context *context = (http_request_context *)parser->data;
^

src/haywire/trie/radix.c:57:32: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
while (*k1 == *k2 && count >= sizeof(int) * 8) {
~~~~~ ^ ~~~~~~~~~~~~~~~
```