astrotycoon / ccl

Automatically exported from code.google.com/p/ccl
0 stars 0 forks source link

Some bugs #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. makefile.msvc failed with msvc
2. heap.c have a bug in function FreeObject 
3. hashtable.c have a bug in function static int Clear(HashTable *ht)

   patch file will fix it(1,2,3).

4. document have a error, in ccl.pdf 5.8.2, Add,
   Both the key and the data are copied into the container. But only value be copied, key just a pointer ref.

Original issue reported on code.google.com by zha...@gmail.com on 24 Apr 2013 at 3:42

Attachments:

GoogleCodeExporter commented 8 years ago
I just encountered (3).

Has this patch been applied to mainline yet?

Original comment by dles...@gmail.com on 29 Jul 2013 at 6:11

GoogleCodeExporter commented 8 years ago
I update to r277, build with MSVC2010, cl(80x86 version 16.00.40219.01)
below is output. please ignore Chinese charators.
-------------------------------------------------------

E:\work\portable\occl>nmake -f Makefile.msvc

Microsoft (R) 程序维护实用工具 10.00.30319.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\vector.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

vector.c
.\vector.c(16) : warning C4013: “snprintf”未定义;假设外部返回 int
.\vector.c(1350) : warning C4245: “=”: 
从“int”转换到“size_t”,有符号/无符
号不匹配
.\vector.c(1373) : warning C4245: “=”: 
从“int”转换到“size_t”,有符号/无符
号不匹配
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\bitstrings.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

bitstrings.c
.\bitstrings.c(40) : warning C4013: 
“snprintf”未定义;假设外部返回 int
.\bitstrings.c(559) : warning C4244: “=”: 从“unsigned 
int”转换到“unsigned c
har”,可能丢失数据
.\bitstrings.c(1043) : warning C4244: “=”: 从“unsigned 
int”转换到“unsigned
char”,可能丢失数据
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\bloom.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

bloom.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\error.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

error.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\deque.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

deque.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\dictionary.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

dictionary.c
e:\work\portable\occl\dictionarygen.c(112) : warning C4013: 
“snprintf”未定义;
假设外部返回 int
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\dlist.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

dlist.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\fgetline.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

fgetline.c
        cl.exe -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\generic.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

generic.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\hashtable.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

hashtable.c
.\hashtable.c(28) : warning C4013: “snprintf”未定义;假设外部返回 
int
e:\work\portable\occl\hashtable.c(508) : warning C4706: 
条件表达式内的赋值
e:\work\portable\occl\hashtable.c(532) : warning C4706: 
条件表达式内的赋值
e:\work\portable\occl\hashtable.c(619) : warning C4706: 
条件表达式内的赋值
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\heap.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

heap.c
        cl.exe -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c iMask.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

iMask.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\list.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

list.c
.\list.c(37) : warning C4013: “snprintf”未定义;假设外部返回 int
e:\work\portable\occl\list.c(958) : warning C4702: 无法访问的代码
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\malloc_debug.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

malloc_debug.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\pool.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

pool.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\pooldebug.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

pooldebug.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\qsortex.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

qsortex.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c queue.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

queue.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\redblacktree.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

redblacktree.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\scapegoat.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

scapegoat.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\searchtree.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

searchtree.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\strcollection.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

strcollection.c
e:\work\portable\occl\strcollectiongen.c(57) : warning C4013: 
“snprintf”未定义
;假设外部返回 int
        cl.exe -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c observer.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

observer.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\valarrayuint.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

valarrayuint.c
e:\work\portable\occl\valarraygen.c(29) : warning C4013: 
“snprintf”未定义;假
设外部返回 int
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\valarrayint.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

valarrayint.c
e:\work\portable\occl\valarraygen.c(29) : warning C4013: 
“snprintf”未定义;假
设外部返回 int
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\valarrayfloat.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

valarrayfloat.c
e:\work\portable\occl\valarraygen.c(29) : warning C4013: 
“snprintf”未定义;假
设外部返回 int
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\valarraylongdouble.
c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

valarraylongdouble.c
e:\work\portable\occl\valarraygen.c(29) : warning C4013: 
“snprintf”未定义;假
设外部返回 int
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1686) : warning C4244: “函数”: 
从“long do
uble”转换到“double”,可能丢失数据
e:\work\portable\occl\valarraygen.c(1686) : warning C4244: “函数”: 
从“long do
uble”转换到“double”,可能丢失数据
e:\work\portable\occl\valarraygen.c(1686) : warning C4244: “函数”: 
从“long do
uble”转换到“double”,可能丢失数据
e:\work\portable\occl\valarraygen.c(1687) : warning C4244: “函数”: 
从“long do
uble”转换到“double”,可能丢失数据
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\valarraylonglong.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

valarraylonglong.c
e:\work\portable\occl\valarraygen.c(29) : warning C4013: 
“snprintf”未定义;假
设外部返回 int
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\valarrayshort.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

valarrayshort.c
e:\work\portable\occl\valarraygen.c(29) : warning C4013: 
“snprintf”未定义;假
设外部返回 int
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\valarraysize_t.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

valarraysize_t.c
e:\work\portable\occl\valarraygen.c(29) : warning C4013: 
“snprintf”未定义;假
设外部返回 int
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\memorymanager.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

memorymanager.c
        cl.exe -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c .\sequential.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

sequential.c
        cl.exe -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c buffer.c
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.40219.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

buffer.c
NMAKE : fatal error U1073: 不知道如何生成“.\tlist.c”
Stop.

Original comment by zha...@gmail.com on 4 Apr 2014 at 1:36

GoogleCodeExporter commented 8 years ago
And I do minor change with makefile.msvc, Please review.

New output:
-------------------------------------------------------

E:\work\portable\occl>nmake -f Makefile.msvc

Microsoft (R) 程序维护实用工具 10.00.30319.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\vector.c
vector.c
.\vector.c(1350) : warning C4245: “=”: 
从“int”转换到“size_t”,有符号/无符
号不匹配
.\vector.c(1373) : warning C4245: “=”: 
从“int”转换到“size_t”,有符号/无符
号不匹配
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\bitstrings.c
bitstrings.c
.\bitstrings.c(559) : warning C4244: “=”: 从“unsigned 
int”转换到“unsigned c
har”,可能丢失数据
.\bitstrings.c(1043) : warning C4244: “=”: 从“unsigned 
int”转换到“unsigned
char”,可能丢失数据
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\bloom.c
bloom.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\error.c
error.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\deque.c
deque.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\dictionary.c
dictionary.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\dlist.c
dlist.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\fgetline.c
fgetline.c
        cl.exe /nologo -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_snpr
intf .\generic.c
generic.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\hashtable.c
hashtable.c
e:\work\portable\occl\hashtable.c(508) : warning C4706: 
条件表达式内的赋值
e:\work\portable\occl\hashtable.c(532) : warning C4706: 
条件表达式内的赋值
e:\work\portable\occl\hashtable.c(619) : warning C4706: 
条件表达式内的赋值
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\heap.c
heap.c
        cl.exe /nologo -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_snpr
intf iMask.c
iMask.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\list.c
list.c
e:\work\portable\occl\list.c(958) : warning C4702: 无法访问的代码
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\malloc_debug.c
malloc_debug.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\pool.c
pool.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\pooldebug.c
pooldebug.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\qsortex.c
qsortex.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf queue.c
queue.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\redblacktree.c
redblacktree.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\scapegoat.c
scapegoat.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\searchtree.c
searchtree.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\strcollection.c
strcollection.c
        cl.exe /nologo -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_snpr
intf observer.c
observer.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\valarrayuint.c
valarrayuint.c
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\valarrayint.c
valarrayint.c
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\valarrayfloat.c
valarrayfloat.c
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\valarraylongdouble.c
valarraylongdouble.c
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1686) : warning C4244: “函数”: 
从“long do
uble”转换到“double”,可能丢失数据
e:\work\portable\occl\valarraygen.c(1686) : warning C4244: “函数”: 
从“long do
uble”转换到“double”,可能丢失数据
e:\work\portable\occl\valarraygen.c(1686) : warning C4244: “函数”: 
从“long do
uble”转换到“double”,可能丢失数据
e:\work\portable\occl\valarraygen.c(1687) : warning C4244: “函数”: 
从“long do
uble”转换到“double”,可能丢失数据
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\valarraylonglong.c
valarraylonglong.c
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\valarrayshort.c
valarrayshort.c
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf .\valarraysize_t.c
valarraysize_t.c
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        cl.exe /nologo -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_snpr
intf .\memorymanager.c
memorymanager.c
        cl.exe /nologo -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_snpr
intf .\sequential.c
sequential.c
        cl.exe /nologo -c -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_s
nprintf buffer.c
buffer.c
        cl.exe /nologo -I. -Zi -W4 -D_CRT_SECURE_NO_WARNINGS -c -Dsnprintf=_snpr
intf /c valarraydouble.c
valarraydouble.c
e:\work\portable\occl\valarraygen.c(1140) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
e:\work\portable\occl\valarraygen.c(1158) : warning C4245: “=”: 
从“int”转换
到“size_t”,有符号/无符号不匹配
        lib /out:cclmsvc.lib  vector.obj  bitstrings.obj  bloom.obj  error.obj
deque.obj  dictionary.obj  dlist.obj  fgetline.obj  generic.obj  hashtable.obj
heap.obj  iMask.obj  list.obj  malloc_debug.obj  pool.obj  pooldebug.obj  qsorte
x.obj  queue.obj  redblacktree.obj  scapegoat.obj  searchtree.obj  strcollection
.obj  observer.obj  valarrayuint.obj  valarrayint.obj  valarrayfloat.obj  valarr
aydouble.obj  valarraylongdouble.obj  valarraylonglong.obj  valarrayshort.obj  v
alarraysize_t.obj  memorymanager.obj  sequential.obj  buffer.obj
Microsoft (R) Library Manager Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        link.exe /debug test.obj cclmsvc.lib
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

E:\work\portable\occl>
E:\work\portable\occl>
E:\work\portable\occl>test
Count 3, Capacity 10
Position 1
Position 2
Martin

Item position 1:Position 2
Count 3, Capacity 10
Position 1
Position 2
Martin

Item position 1:Position 2
Count 3, Capacity 10
Position 1
Position 2
Martin

Original list:
1 2 3 4 5 6 7 8 9 10
Removing element 2 to 5
1 2 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10 Size: 272
1 3 4 5 6 7 8 9 10 Count 3, Capacity 10
Position 1
Position 2
Martin

Item position 1:Position 2
Count 3, Capacity 10
Position 1
Position 2
Martin

b and c are not equal?
Original b:              1111 1010  0101 1100  0011 1001  0110 1111  1010 0101
RemoveAt(b,4)             111 1101  0010 1110  0001 1100  1011 0111  1101 0101
Insert(b,4,1)            1111 1010  0101 1100  0011 1000  0110 1111  1011 0101

c:
Add 1: c                                                                     1
LeftShift(c,5                                                                0
GetRange(b,4)                                                             1110
Index of 1 in b is 0
Index of 0 in b is 1
Population count of original b is 24
Bit block count of original b is 0
011 AND 11011                                                         000 0001
The block count of c is 3
1 2 3 4 5 6 7 8 9 10 Size: 292
1 3 4 5 6 7 8 9 10 Buffer size is: 129
item 1
item 2
item 3
item 4
item 5
item 6
item 7
item 8
item 9
item 10

E:\work\portable\occl>nmake -f Makefile.msvc clean

Microsoft (R) 程序维护实用工具 10.00.30319.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

        del  vector.obj  bitstrings.obj  bloom.obj  error.obj  deque.obj  dictio
nary.obj  dlist.obj  fgetline.obj  generic.obj  hashtable.obj  heap.obj  iMask.o
bj  list.obj  malloc_debug.obj  pool.obj  pooldebug.obj  qsortex.obj  queue.obj
 redblacktree.obj  scapegoat.obj  searchtree.obj  strcollection.obj  observer.ob
j  valarrayuint.obj  valarrayint.obj  valarrayfloat.obj  valarraydouble.obj  val
arraylongdouble.obj  valarraylonglong.obj  valarrayshort.obj  valarraysize_t.obj
  memorymanager.obj  sequential.obj  buffer.obj dotest.exe cclmsvc.lib

E:\work\portable\occl>

Original comment by zha...@gmail.com on 4 Apr 2014 at 2:03

Attachments: