Small code nits #54

已关闭
devnexen2019-07-05 12:20:37 +02:00创建 · 5 评论
普通成员

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`.
belliash2019-07-09 07:43:41 +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?
作者
普通成员

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.
管理员

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.
作者
普通成员

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.
devnexen2019-07-10 21:05:30 +02:00belliash 指派
管理员

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
Ghost2019-07-12 14:41:04 +02:00 关闭此工单
登录 并参与到对话中。
未选择里程碑
未指派成员
2 名参与者
通知
到期时间
到期日期无效或超出范围。请使用 'yyyy-mm-dd' 格式。

未设置到期时间。

依赖工单

没有设置依赖项。

参考:aerscript/Aer#54
没有提供说明。