Small code nits #54

Закрыто
открыта 2019-07-05 12:20:37 +02:00 devnexen · комментариев: 5
devnexen прокомментировал(а) 2019-07-05 12:20:37 +02:00
Участник

Few compiler warning I get with current code on master :

engine/vm.c / line 941, the last argument might deserve an explicit cast.
include/ph7int.h / line 1892 ; engine/lib/libzip.c / line 514, just stylistic here no newline at end of file.

Few compiler warning I get with current code on master : `engine/vm.c / line 941`, the last argument might deserve an explicit cast. `include/ph7int.h / line 1892` ; `engine/lib/libzip.c / line 514`, just stylistic here `no newline at end of file`.
belliash назначил(а) на себя 2019-07-09 07:43:41 +02:00
belliash прокомментировал(а) 2019-07-09 07:44:26 +02:00
Владелец

Do they come from GCC or any other compiler? Could you post the entire build log?

Do they come from GCC or any other compiler? Could you post the entire build log?
devnexen прокомментировал(а) 2019-07-09 15:01:07 +02:00
Автор
Участник

gcc 8 in my part :
engine/vm.c: In function ‘PH7_VmInit’: engine/vm.c:941:56: warning: passing argument 4 of ‘SyHashInit’ from incompatible pointer type [-Wincompatible-pointer-types] SyHashInit(&pVm->hClass, &pVm->sAllocator, SyStrHash, SyStrncmp); signature of the callback not really matching, seems "picky" here IMHO but a cast would not kill.

gcc 8 in my part : `engine/vm.c: In function ‘PH7_VmInit’: engine/vm.c:941:56: warning: passing argument 4 of ‘SyHashInit’ from incompatible pointer type [-Wincompatible-pointer-types] SyHashInit(&pVm->hClass, &pVm->sAllocator, SyStrHash, SyStrncmp);` signature of the callback not really matching, seems "picky" here IMHO but a cast would not kill.
belliash прокомментировал(а) 2019-07-10 12:56:17 +02:00
Владелец

This is not as simple to correct. The callback function is used in several places and its signature does not match only here.

This is not as simple to correct. The callback function is used in several places and its signature does not match only here.
devnexen прокомментировал(а) 2019-07-10 13:01:23 +02:00
Автор
Участник

I meant the cast only on this line but as said that s cosmetic, it works as it anyway.

I meant the cast only on this line but as said that s cosmetic, it works as it anyway.
devnexen был(а) назначен(а) belliash 2019-07-10 21:05:30 +02:00
belliash прокомментировал(а) 2019-07-10 21:07:55 +02:00
Владелец

I think, we can cast this just to remove this ugly warning. Anyway you will need to commit a fix, as I have a faulty PC and currently cannot work on AerScript. Im waiting for hardware I ordered.

I think, we can cast this just to remove this ugly warning. Anyway you will need to commit a fix, as I have a faulty PC and currently cannot work on AerScript. Im waiting for hardware I ordered.
belliash был снят с назначения Ghost 2019-07-12 14:29:29 +02:00
devnexen был снят с назначения Ghost 2019-07-12 14:29:30 +02:00
Ghost закрыл(а) эту задачу 2019-07-12 14:41:04 +02:00
Войдите, чтобы присоединиться к обсуждению.
Нет этапа
Нет назначенных лиц
2 участников
Уведомления
Срок выполнения
Срок действия недействителен или находится за пределами допустимого диапазона. Пожалуйста, используйте формат 'гггг-мм-дд'.

Срок выполнения не установлен.

Зависимости

Зависимостей нет.

Ссылка: aerscript/Aer#54
Описание отсутствует.