[Mesa-dev] [PATCH v2 3/3] util/sha1: drop _mesa_sha1_{update, format} return type

Grazvydas Ignotas notasas at gmail.com
Tue Mar 14 00:42:57 UTC 2017


On Tue, Mar 14, 2017 at 2:28 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 13 March 2017 at 22:38, Grazvydas Ignotas <notasas at gmail.com> wrote:
>> On Mon, Mar 13, 2017 at 6:52 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>> ...
>>> diff --git a/src/util/mesa-sha1.h b/src/util/mesa-sha1.h
>>> index f927d5772d..ecbc708b5e 100644
>>> --- a/src/util/mesa-sha1.h
>>> +++ b/src/util/mesa-sha1.h
>>> @@ -34,7 +34,7 @@ extern "C" {
>>>
>>>  #define _mesa_sha1_init SHA1Init
>>>
>>> -int
>>> +void
>>>  _mesa_sha1_update(struct mesa_sha1 *ctx, const void *data, int size);
>>
>> This has become rather inconsistent, _mesa_sha1_init() is a macro to
>> SHA1Init(), _mesa_sha1_update() is a prototype for a trivial
>> implementation, and _mesa_sha1_final() is an inline function. Maybe
>> make all 3 inlines instead, so the names appear in debug stack dumps?
>>
> v1 did that, but after rebasing earlier GCC started throwing an angry
> error due to the different type of data.
> Wanted to get these out asap, since they make your patches easier.
> Will take a look why/how that happens in a bit.

It's probably while compiling c++ code, where type checking is more
strict and you must cast void * pointers to other pointer types,
unlike in C where you don't have to.

>> In either case:
>> Reviewed-by: Grazvydas Ignotas <notasas at gmail.com>

... for the series.

GraÅžvydas


More information about the mesa-dev mailing list