joyent/http-parser — pull request #164 by charliesome (2013-11-19 09:52:09+00:00)
Title: Use unsigned int as bitfield type

Compiling any file that includes `http_parser.h` with `-pedantic` on GCC gives this warning:

```
inc/http_parser.h:196:3: warning: type of bit-field ‘type’ is a GCC extension [-pedantic]
inc/http_parser.h:197:3: warning: type of bit-field ‘flags’ is a GCC extension [-pedantic]
inc/http_parser.h:210:3: warning: type of bit-field ‘http_errno’ is a GCC extension [-pedantic]
inc/http_parser.h:217:3: warning: type of bit-field ‘upgrade’ is a GCC extension [-pedantic]
```

This pull request changes the types of the members of both bitfields in `struct http_parser` to be `unsigned int`, which fixes this warning.

This *should* pack just as well as what's there currently. On gcc 4.2.1 at least, there's no change in the total size of `struct http_parser` after applying this patch.