Commit Graph

26 Commits

Author SHA1 Message Date
Arkadiy Shapkin
10c06114cb Several warnings detected by static code analyzer fixed
Implicit type conversion argument of function to size_t type
Suspicious sequence of types castings: size_t -> int -> size_t
Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)'
Unsigned type is never < 0
2013-03-18 03:30:26 +04:00
Vicent Marti
6e237de6d8 regex: Proper define for this thing 2013-01-11 18:19:52 +01:00
Sebastian Bauer
976d9e136f regex: Fixed warnings about unused parameter values.
There are different solutions to the problem. In this change, we
define an UNUSED macro that maps to __attribute__((unused)) when
compiling with gcc. Otherwise it is a NOOP. We apply this macro
in all function headers for each parameter value that is not used
within the function body.

The change is local to regex.
2013-01-11 11:03:48 +01:00
Sebastian Bauer
d2f14df8c1 regex: Fixed several warnings about signed/unsigned conversions. 2013-01-11 11:03:48 +01:00
Martin Woodward
826bc4a81b Remove use of English expletives
Remove words such as fuck, crap, shit etc.
Remove other potentially offensive words from comments.
Tidy up other geopolicital terms in comments.
2012-11-23 13:31:22 +00:00
Vicent Marti
64ac9548aa Bump the builtin http-parser 2012-11-12 15:42:03 -08:00
Carlos Martín Nieto
b13dbb91ea regex: fix sign warnings 2012-02-18 01:32:13 +01:00
Carlos Martín Nieto
1eaecf2f18 regex: The world uses utf-8 2012-02-18 01:31:48 +01:00
Carlos Martín Nieto
4a1ecba6d9 regex: Move the defines to a config header and include it unconditionally 2012-02-18 01:31:43 +01:00
Carlos Martín Nieto
c17b1d0052 Add POSIX regex sources when needed
Windows doesn't support POSIX regex, so we need to include it
ourselves. The sources come from git, which in turn took them from
gawk.
2012-02-17 22:00:17 +01:00
Vicent Marti
dd3fd68266 msvc: Remove superfluous includes 2011-10-05 13:44:27 -07:00
Vicent Marti
72bdfdbc7c http-parser: Disable MSVC warnings locally 2011-09-29 15:25:22 +02:00
Carlos Martín Nieto
0812caaea5 Resync with upstream http-parser 2011-09-28 23:54:09 +02:00
Vicent Marti
d215cf2429 http-parser: More type changes 2011-09-28 20:21:48 +02:00
Vicent Marti
59903b1fab Change types in http-parser 2011-09-28 19:41:33 +02:00
Carlos Martín Nieto
a5b0e7f8bc Really fix MSVC
These was left over from the previous PRs.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-27 20:08:15 +02:00
Carlos Martín Nieto
887eaf4dc9 Fix dev branch under MSVC
In libgit2: Move an enum out of an int bitfield in the HTTP transport.

In the parser: Use int bitfields and change some variable sizes to
better fit thir use. Variables that count the size of the data chunk
can only ever be as large as off_t. Warning 4127 can be ignored, as
nobody takes it seriously anyway.

From Emeric: change some variable declarations to keep MSVC happy.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-27 15:02:36 +02:00
Vicent Marti
dc5c87812c http-parser: Do not use bitfields
Bitfields suck. And if you make them with non-int types, they suck
in a non-standards compliant way. Like sucking sideways or something.

This commit removes all bitfields in the `http_parser` struct, and
replaces them with the minimal type needed to contain their values. Note
that the fields in the struct have been reordered so they can be packed
with 4-byte alignment.

This saves both memory on the parser (because non-int bitfields get expanded to
4byte in most compilers anyway) and time (because the fields are now
properly aligned and the compiler doesn't need to generate bit-level ops
to access them).
2011-09-27 14:59:34 +02:00
Carlos Martín Nieto
b8a8191fed http: add http-parser
The code is under the MIT lincense

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-09 13:12:12 +02:00
Vicent Marti
f6867e639a Fix compilation in Windows 2011-08-08 16:56:28 -07:00
Vicent Marti
ec62685345 zlib: Declare preprocessor directives at build time 2011-07-01 17:34:27 +02:00
Vicent Marti
8a0620030c zlib: No visualization attributes.
The visibility attribute is a headache on many platforms like Solaris,
and not even supported on Windows.
2011-06-30 22:28:19 +02:00
Vicent Marti
9f81a37aa4 Define NO_GZIP in zconf.h instead of at compile time 2011-03-16 23:02:31 +02:00
Vicent Marti
434bedcda0 Fix compilation warnings in ZLib (MSVC)
Yes, we are changing the Zlib code. This is dangerous and uncool.
Fortunately, these are just some implicit casts.
2011-03-15 19:46:38 +02:00
Vicent Marti
5f8078d4dc Use a more sane zconf.f when building Zlib 2011-03-15 04:22:47 +02:00
Vicent Marti
ab6a3d3de5 Add ZLib as a built-in dependency
I don't know if this is good or bad. This lets libgit2 compile cleanly
on any platforms without any external dependencies, but adds a little
bit of bloat...

Let's test this out and see what happens.
2011-03-15 03:29:20 +02:00