Commit Graph

19 Commits

Author SHA1 Message Date
Vicent Martí
1adf8c6a9c compat: va_copy on Win32 systems 2012-05-04 13:52:38 -07:00
Vicent Martí
1a48112342 error-handling: References
Yes, this is error handling solely for `refs.c`, but some of the
abstractions leak all ofer the code base.
2012-03-06 00:43:10 +01:00
Russell Belfer
854eccbb2d Clean up GIT_UNUSED macros on all platforms
It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5
did not fix the GIT_USUSED behavior on all platforms.  This commit
walks through and really cleans things up more thoroughly, getting
rid of the unnecessary stuff.

To remove the use of some GIT_UNUSED, I ended up adding a couple
of new iterators for hashtables that allow you to iterator just
over keys or just over values.

In making this change, I found a bug in the clar tests (where we
were doing *count++ but meant to do (*count)++ to increment the
value).  I fixed that but then found the test failing because it
was not really using an empty repo.  So, I took some of the code
that I wrote for iterator testing and moved it to clar_helpers.c,
then made use of that to make it easier to open fixtures on a
per test basis even within a single test file.
2012-03-02 15:51:55 -08:00
Russell Belfer
2705576bfa Simplify GIT_UNUSED macros
Since casting to void works to eliminate errors with unused
parameters on all platforms, avoid the various special cases.
Over time, it will make sense to eliminate the GIT_UNUSED
macro completely and just have GIT_UNUSED_ARG.
2012-03-02 15:49:28 -08:00
schu
5e0de32818 Update Copyright header
Signed-off-by: schu <schu-github@schulog.org>
2012-02-13 17:11:09 +01:00
Vicent Marti
c060854ed5 msvc: Properly handle inttypes.h/stdint.h 2011-10-05 16:21:16 -04:00
Vicent Marti
6c8b458dcc mingw: Fix compilation warnings 2011-09-29 17:04:45 +02:00
Vicent Marti
780bea6e26 mingw: Fix printf identifiers 2011-09-29 16:23:24 +02:00
Vicent Marti
87d9869fc3 Tabify everything
There were quite a few places were spaces were being used instead of
tabs. Try to catch them all. This should hopefully not break anything.
Except for `git blame`. Oh well.
2011-09-19 03:34:49 +03:00
Vicent Marti
bb742ede3d Cleanup legal data
1. The license header is technically not valid if it doesn't have a
copyright signature.

2. The COPYING file has been updated with the different licenses used in
the project.

3. The full GPLv2 header in each file annoys me.
2011-09-19 01:54:32 +03:00
Ramsay Jones
ca3939e682 msvc: Disable a level 4 warning and change -W3 to -W4
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
2010-06-07 19:46:17 +01:00
Ramsay Jones
73dcf2876f msvc: Fix some "unreferenced formal parameter" warnings
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
2010-01-20 20:22:10 +00:00
Ramsay Jones
1a7bae4d0f Fix some "unused parameter" warnings with -Wextra
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
2010-01-20 20:19:55 +00:00
Ramsay Jones
a1c0728d12 Add support for the MinGW platform
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
2010-01-20 20:15:07 +00:00
Ramsay Jones
5cae6c2527 Disable some msvc "deprecated function" warnings again
In addition to removing the inline #define, commit 209849a also
removed a #pragma to disable msvc deprecated function warnings.
Without this #pragma, msvc currently issues 19 warnings related
to "deprecated insecure c-library functions", such as strcpy()
and 22 warnings related to "deprecated POSIX function names",
such as open().

In order to supress these warnings, re-instate the #pragma.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
2009-10-13 16:22:18 +01:00
Julio Espinoza-Sokal
209849a449 Use GIT_INLINE macro instead of keyword inline.
No need to define inline as __inline because libgit2 code
should be using GIT_INLINE instead.

Signed-off-by: Julio Espinoza-Sokal <julioes@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
2009-06-16 11:40:48 +02:00
Ramsay Jones
8a086f872a win32: Add support for the MS Visual C/C++ compiler
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
2009-06-15 07:34:28 +02:00
Ramsay Jones
2bf93fa107 Correct the spelling of the FLEX_ARRAY macro
When setting the default value, the macro name was specified
as GIT_FLEX_ARRAY, which is inconsistent with it's earlier
usage in the file. This caused a compilation error, using the
MS Visual C/C++ compiler, when compiling the git_packlist
struct definition in src/odb.c.

In addition to changing the spelling of the FLEX_ARRAY macro
to GIT_FLEX_ARRAY, including it's use in src/odb.c, we also
rename the TYPEOF macro to GIT_TYPEOF.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
2009-06-15 07:33:44 +02:00
Andreas Ericsson
f501265f97 Add cc-compat.h - C compiler compat macros for internal use
Holds things such as FLEX_ARRAY and whatnot.

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-22 12:08:00 -08:00