fix: win: fix the last warns
This commit is contained in:
4
.github/workflows/tests.yml
vendored
4
.github/workflows/tests.yml
vendored
@@ -39,8 +39,8 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: configure
|
- name: configure
|
||||||
run: |
|
run: |
|
||||||
echo running ./configure ${{ matrix.clionly }}
|
echo running ./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
|
||||||
./configure ${{ matrix.clionly }}
|
./configure ${{ matrix.clionly }} ${{ matrix.debugprintf }} --with-werror
|
||||||
- name: make
|
- name: make
|
||||||
run: nproc && make -j$(nproc)
|
run: nproc && make -j$(nproc)
|
||||||
- name: check executable
|
- name: check executable
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
/* The original windows ftruncate has off_size (32bit) */
|
/* The original windows ftruncate has off_size (32bit) */
|
||||||
|
|
||||||
int large_ftruncate(int fd, gint64 size)
|
int large_ftruncate(int fd, gint64 size)
|
||||||
{ gint32 handle;
|
{ intptr_t handle;
|
||||||
|
|
||||||
if((handle=_get_osfhandle(fd)) == -1)
|
if((handle=_get_osfhandle(fd)) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -806,7 +806,7 @@ static gpointer io_thread(ecc_closure *ec)
|
|||||||
/*** Allocate local parity buffer aligned at 128bit boundary */
|
/*** Allocate local parity buffer aligned at 128bit boundary */
|
||||||
|
|
||||||
ec->paritybase = g_malloc(n_parity_bytes+16); /* output buffer */
|
ec->paritybase = g_malloc(n_parity_bytes+16); /* output buffer */
|
||||||
ec->parity = ec->paritybase + (16- ((unsigned long)ec->paritybase & 15));
|
ec->parity = ec->paritybase + (16- ((intptr_t)ec->paritybase & 15));
|
||||||
|
|
||||||
/*** Create buffer for the ndata input layers
|
/*** Create buffer for the ndata input layers
|
||||||
Space is provided for one more sector so that
|
Space is provided for one more sector so that
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ AlignedBuffer* CreateAlignedBuffer(int size)
|
|||||||
{ AlignedBuffer *ab = g_malloc0(sizeof(AlignedBuffer));
|
{ AlignedBuffer *ab = g_malloc0(sizeof(AlignedBuffer));
|
||||||
|
|
||||||
ab->base = g_malloc(size+4096);
|
ab->base = g_malloc(size+4096);
|
||||||
ab->buf = ab->base + (4096 - ((unsigned long)ab->base & 4095));
|
ab->buf = ab->base + (4096 - ((intptr_t)ab->base & 4095));
|
||||||
|
|
||||||
return ab;
|
return ab;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user