git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/4] misc. msvc patches
@ 2010-01-20 19:19 Ramsay Jones
  2010-01-20 20:57 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Ramsay Jones @ 2010-01-20 19:19 UTC (permalink / raw
  To: Junio C Hamano; +Cc: Johannes Sixt, GIT Mailing-list

Hi Junio,

Since we can now build git on Cygwin using msvc, I've been looking to
suppress the *many* compiler warnings issued by msvc; OK I haven't been
trying too hard, since Windows is not my main platform and msvc is not
my primary compiler! ;-)  However, every little helps...

The following patches have been hanging around for several weeks, so I
decided to pass them on now rather than wait until I get around to finishing
the other patches.

[PATCH 1/4] engine.pl: Fix a recent breakage of the buildsystem generator
[PATCH 2/4] msvc: Fix an "unrecognized option" linker warning
[PATCH 3/4] msvc: Fix a compiler warning due to an incorrect pointer cast
[PATCH 4/4] msvc: Add a definition of NORETURN compatible with msvc compiler

These patches remove 86 warnings for me (84 of those due to patch #4).

I have another (small) patch which avoids 109 further warnings, but I
want to provide an alternative solution; this solution is currently a
4 patch series which only removes about 60 warnings so far...

ATB,
Ramsay Jones

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/4] misc. msvc patches
  2010-01-20 19:19 [PATCH 0/4] misc. msvc patches Ramsay Jones
@ 2010-01-20 20:57 ` Junio C Hamano
  2010-01-22 19:28   ` Ramsay Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2010-01-20 20:57 UTC (permalink / raw
  To: Ramsay Jones; +Cc: Junio C Hamano, Johannes Sixt, GIT Mailing-list

I only looked at regex/regex.c and it really is a real bugfix as the
structure fields are of pointer type ;-).

I'll wait for Hannes, Sebastian Shuberth and/or Marius Storm-Olsen, as
they appear in "git shortlog compat/vcbuild contrib/buildsystems", for
their Acks.

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/4] misc. msvc patches
  2010-01-20 20:57 ` Junio C Hamano
@ 2010-01-22 19:28   ` Ramsay Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Ramsay Jones @ 2010-01-22 19:28 UTC (permalink / raw
  To: Junio C Hamano; +Cc: Johannes Sixt, GIT Mailing-list

Junio C Hamano wrote:
> I only looked at regex/regex.c and it really is a real bugfix as the
> structure fields are of pointer type ;-).

Hmmm, well ... I would call it a typo fixup rather than a bugfix, since
(luckily) there is no actual bug here.

The expression on the rhs of the assignment is a valid null pointer
expression; since regoff_t is an alias for int the expression amounts
to '(int) 0', so the cast is a no-op and is equivalent to an "integer
constant with value zero". In C, an "integer constant with value zero
(or any such constant cast to void *)" is a null pointer constant.
(Many people wish it wasn't...)

Having said that, I would be *very* surprised if the original author
had intended to type anything other than '(regoff_t *) 0'. Hence I
suspect this is a typo.

[Hmm, I haven't actually looked at the assembler to check that the
generated object code is correct, but not even msvc could get this
wrong ... :-P ]

ATB,
Ramsay Jones

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 0/4]  misc. MSVC patches
@ 2010-06-23 19:36 Ramsay Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Ramsay Jones @ 2010-06-23 19:36 UTC (permalink / raw
  To: Junio C Hamano; +Cc: GIT Mailing-list

Hi Junio,

I have been spring cleaning my branches and found these MSVC patches
down the back of the sofa. ;-)

Nothing very exciting, but I thought I would pass them on anyway.

The second patch may improve SHA1 performance slightly, but I have
not timed it.

I think some variant of the final patch has been seen on the list
before and was not applied; I don't remember much discussion, so
I don't recall if or why it was rejected...

Ramsay Jones (4):
  msvc: Fix some "expr evaluates to function" compiler warnings
  msvc: Select the "fast" definition of the {get,put}_be32() macros
  msvc: Fix some compiler warnings
  Makefile: Don't pass $(ALL_CFLAGS) to the linker

 Makefile          |   14 +++++++-------
 block-sha1/sha1.c |    9 +++++----
 builtin.h         |    4 ++--
 builtin/notes.c   |    2 +-
 notes.h           |    4 ++--
 5 files changed, 17 insertions(+), 16 deletions(-)


ATB,
Ramsay Jones

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-23 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-23 19:36 [PATCH 0/4] misc. MSVC patches Ramsay Jones
  -- strict thread matches above, loose matches on Subject: below --
2010-01-20 19:19 [PATCH 0/4] misc. msvc patches Ramsay Jones
2010-01-20 20:57 ` Junio C Hamano
2010-01-22 19:28   ` Ramsay Jones

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).