{"thread":{"id":"22311","subject":"[PATCH 0/4] misc. msvc patches","startedAt":"2010-01-20T19:19:26Z","lastAt":"2010-01-22T19:28:31Z","messageCount":3,"participants":["Ramsay Jones","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"132214","messageId":"4B57573E.2050006@ramsay1.demon.co.uk","threadId":"22311","inReplyTo":null,"subject":"[PATCH 0/4] misc. msvc patches","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2010-01-20T19:19:26Z","receivedAt":"2010-01-20T19:19:26Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Hi Junio,\n\nSince we can now build git on Cygwin using msvc, I've been looking to\nsuppress the *many* compiler warnings issued by msvc; OK I haven't been\ntrying too hard, since Windows is not my main platform and msvc is not\nmy primary compiler! ;-)  However, every little helps...\n\nThe following patches have been hanging around for several weeks, so I\ndecided to pass them on now rather than wait until I get around to finishing\nthe other patches.\n\n[PATCH 1/4] engine.pl: Fix a recent breakage of the buildsystem generator\n[PATCH 2/4] msvc: Fix an \"unrecognized option\" linker warning\n[PATCH 3/4] msvc: Fix a compiler warning due to an incorrect pointer cast\n[PATCH 4/4] msvc: Add a definition of NORETURN compatible with msvc compiler\n\nThese patches remove 86 warnings for me (84 of those due to patch #4).\n\nI have another (small) patch which avoids 109 further warnings, but I\nwant to provide an alternative solution; this solution is currently a\n4 patch series which only removes about 60 warnings so far...\n\nATB,\nRamsay Jones\n"},{"id":"132222","messageId":"7vmy081okq.fsf@alter.siamese.dyndns.org","threadId":"22311","inReplyTo":"4B57573E.2050006@ramsay1.demon.co.uk","subject":"Re: [PATCH 0/4] misc. msvc patches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-20T20:57:57Z","receivedAt":"2010-01-20T20:57:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I only looked at regex/regex.c and it really is a real bugfix as the\nstructure fields are of pointer type ;-).\n\nI'll wait for Hannes, Sebastian Shuberth and/or Marius Storm-Olsen, as\nthey appear in \"git shortlog compat/vcbuild contrib/buildsystems\", for\ntheir Acks.\n\nThanks.\n"},{"id":"132419","messageId":"4B59FC5F.8010901@ramsay1.demon.co.uk","threadId":"22311","inReplyTo":"7vmy081okq.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 0/4] misc. msvc patches","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2010-01-22T19:28:31Z","receivedAt":"2010-01-22T19:28:31Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Junio C Hamano wrote:\n> I only looked at regex/regex.c and it really is a real bugfix as the\n> structure fields are of pointer type ;-).\n\nHmmm, well ... I would call it a typo fixup rather than a bugfix, since\n(luckily) there is no actual bug here.\n\nThe expression on the rhs of the assignment is a valid null pointer\nexpression; since regoff_t is an alias for int the expression amounts\nto '(int) 0', so the cast is a no-op and is equivalent to an \"integer\nconstant with value zero\". In C, an \"integer constant with value zero\n(or any such constant cast to void *)\" is a null pointer constant.\n(Many people wish it wasn't...)\n\nHaving said that, I would be *very* surprised if the original author\nhad intended to type anything other than '(regoff_t *) 0'. Hence I\nsuspect this is a typo.\n\n[Hmm, I haven't actually looked at the assembler to check that the\ngenerated object code is correct, but not even msvc could get this\nwrong ... :-P ]\n\nATB,\nRamsay Jones\n"}]}