Re: Remove useless casts to (void *)
| От | Aleksander Alekseev |
|---|---|
| Тема | Re: Remove useless casts to (void *) |
| Дата | |
| Msg-id | CAJ7c6TNKK1_Kq4t0_XgNPraRKKcuMtH4eZPfq9YcVP09OXJC5A@mail.gmail.com обсуждение исходный текст |
| Ответ на | Remove useless casts to (void *) (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>) |
| Ответы |
Re: Remove useless casts to (void *)
Re: Remove useless casts to (void *) |
| Список | pgsql-hackers |
Hi Bertrand, > The attached also remove casts that have been added since 7f798aca1d5, the ones > in pg_publication.c, lock.c and tuplesortvariants.c. > > The patch has been generated with the help of the .cocci script [2] (though I > manually reviewed and removed some matches that, I think, were not appropriate). I didn't review the entire patch but one change caught my attention: ``` - databuf = (void *) ((char *) databuf + avail); + databuf = (char *) databuf + avail; ``` Here `databuf` has a type (void*). Although the code is correct, it replaces an explicit cast (which I read "yes, we know what we are doing") with an implicit one. Personally I don't think this is a good change. These were just my two cents. All in all I'm neither for nor against the patch. -- Best regards, Aleksander Alekseev
В списке pgsql-hackers по дате отправления: