<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat/nedmalloc, branch gitk-resize-error</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=gitk-resize-error</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=gitk-resize-error'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2021-09-03T18:40:30Z</updated>
<entry>
<title>win32: allow building with pedantic mode enabled</title>
<updated>2021-09-03T18:40:30Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2021-09-03T17:02:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=27e0c3c6cfead8fccd16105be497dba7ccd0ec6b'/>
<id>urn:sha1:27e0c3c6cfead8fccd16105be497dba7ccd0ec6b</id>
<content type='text'>
In preparation to building with pedantic mode enabled, change a couple
of places where the current mingw gcc compiler provided with the SDK
reports issues.

A full fix for the incompatible use of (void *) to store function
pointers has been punted, with the minimal change to instead use a
generic function pointer (FARPROC), and therefore the (hopefully)
temporary need to disable incompatible pointer warnings.

Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix spelling errors in no-longer-updated-from-upstream modules</title>
<updated>2019-11-10T07:00:55Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-11-05T17:07:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=03670c8b2375062a5bcc50ce8891a4406fbc88e2'/>
<id>urn:sha1:03670c8b2375062a5bcc50ce8891a4406fbc88e2</id>
<content type='text'>
We have several modules originally taken from some upstream source,
and which as far as I can tell we no longer update from the upstream
anymore.  As such, I have not submitted these spelling fixes to any
external projects but just include them directly here.

Reported-by: Jens Schleusener &lt;Jens.Schleusener@fossies.org&gt;
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>nedmalloc: avoid compiler warning about unused value</title>
<updated>2019-08-07T18:54:55Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-08-07T13:09:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=70597e838601ee6be5c43ece255c9df47f8fe9a2'/>
<id>urn:sha1:70597e838601ee6be5c43ece255c9df47f8fe9a2</id>
<content type='text'>
Cast the evaluated value of the macro INITIAL_LOCK to void to instruct
the compiler that we're not interested in said value nor the following
warning:

In file included from compat/nedmalloc/nedmalloc.c:63:
compat/nedmalloc/malloc.c.h: In function ‘init_user_mstate’:
compat/nedmalloc/malloc.c.h:1706:62: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
 1706 | #define INITIAL_LOCK(sl)      (memset(sl, 0, sizeof(MLOCK_T)), 0)
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
compat/nedmalloc/malloc.c.h:5020:3: note: in expansion of macro ‘INITIAL_LOCK’
 5020 |   INITIAL_LOCK(&amp;m-&gt;mutex);
      |   ^~~~~~~~~~~~

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>nedmalloc: do assignments only after the declaration section</title>
<updated>2019-08-07T18:54:45Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2019-08-07T13:08:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c9b9c09dae175f75bed4363cc6278c3f0cb3b9dd'/>
<id>urn:sha1:c9b9c09dae175f75bed4363cc6278c3f0cb3b9dd</id>
<content type='text'>
Avoid the following compiler warning:

In file included from compat/nedmalloc/nedmalloc.c:63:
compat/nedmalloc/malloc.c.h: In function ‘pthread_release_lock’:
compat/nedmalloc/malloc.c.h:1759:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
 1759 |     volatile unsigned int* lp = &amp;sl-&gt;l;
      |     ^~~~~~~~

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>compat: move strdup(3) replacement to its own file</title>
<updated>2016-09-07T17:41:45Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-09-03T15:59:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=ca2baa3f7532dfe1816b623f39489ed10f3c9a49'/>
<id>urn:sha1:ca2baa3f7532dfe1816b623f39489ed10f3c9a49</id>
<content type='text'>
Move our implementation of strdup(3) out of compat/nedmalloc/ and
allow it to be used independently from USE_NED_ALLOCATOR.  The
original nedmalloc doesn't come with strdup() and doesn't need it.
Only _users_ of nedmalloc need it, which was added when we imported
it to our compat/ hierarchy.

This reduces the difference of our copy of nedmalloc from the
original, making it easier to update, and allows for easier testing
and reusing of our version of strdup().

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>nedmalloc: work around overzealous GCC 6 warning</title>
<updated>2016-08-05T22:37:47Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-08-04T21:56:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c6c9e1885c9025f2e4074105e4fbe9b008e5d1a3'/>
<id>urn:sha1:c6c9e1885c9025f2e4074105e4fbe9b008e5d1a3</id>
<content type='text'>
With GCC 6, the strdup() function is declared with the "nonnull"
attribute, stating that it is not allowed to pass a NULL value as
parameter.

In nedmalloc()'s reimplementation of strdup(), Postel's Law is heeded
and NULL parameters are handled gracefully. GCC 6 complains about that
now because it thinks that NULL cannot be passed to strdup() anyway.

Because the callers in this project of strdup() must be prepared to
call any implementation of strdup() supplied by the platform, so it
is pointless to pretend that it is OK to call it with NULL.

Remove the conditional based on NULL-ness of the input; this
squelches the warning.  Check the return value of malloc() instead
to make sure we actually got the memory to write to.

See https://gcc.gnu.org/gcc-6/porting_to.html for details.

Diagnosed-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>nedmalloc: fix misleading indentation</title>
<updated>2016-08-04T17:42:05Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-08-04T16:07:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=1e70105954fd85fcb198a4b5b95378ecc3e6beef'/>
<id>urn:sha1:1e70105954fd85fcb198a4b5b95378ecc3e6beef</id>
<content type='text'>
Some code in nedmalloc is indented in a funny way that could be
misinterpreted as if a line after a for loop was included in the loop
body, when it is not.

GCC 6 complains about this in DEVELOPER=YepSure mode.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mingw: uglify (a, 0) definitions to shut up warnings</title>
<updated>2016-01-15T22:02:39Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-01-15T13:24:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=2921600afbcdd5f245475602cabba2fbaa5ff93f'/>
<id>urn:sha1:2921600afbcdd5f245475602cabba2fbaa5ff93f</id>
<content type='text'>
When the result of a (a, 0) expression is not used, MSys2's GCC version
finds it necessary to complain with a warning:

	right-hand operand of comma expression has no effect

Let's just pretend to use the 0 value and have a peaceful and quiet life
again.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>nedmalloc: allow compiling with MSys2's compiler</title>
<updated>2016-01-14T20:20:33Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-01-14T16:51:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=9e2af084d4326ea2b1192074fb1d1ccefe0016a3'/>
<id>urn:sha1:9e2af084d4326ea2b1192074fb1d1ccefe0016a3</id>
<content type='text'>
With MSys2's GCC, `ReadWriteBarrier` is already defined, and FORCEINLINE
unfortunately gets defined incorrectly.

Let's work around both problems, using the MSys2-specific
__MINGW64_VERSION_MAJOR constant to guard the FORCEINLINE definition so
as not to affect other platforms.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>prefer memcpy to strcpy</title>
<updated>2015-10-05T18:08:05Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-09-24T21:08:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=34fa79a6cde56d6d428ab0d3160cb094ebad3305'/>
<id>urn:sha1:34fa79a6cde56d6d428ab0d3160cb094ebad3305</id>
<content type='text'>
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).

This also eliminates calls to strcpy, which make auditing
the code base harder.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
