Skip to content

Commit

Permalink
Resolved alerts.
Browse files Browse the repository at this point in the history
  • Loading branch information
voldien committed Sep 23, 2020
1 parent 046f9fb commit 134751a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/compression.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ void sntInitCompression(unsigned int type){
/* */
err = BZ2_bzCompressInit(bzip2com, 9, 0, 0);
if(err < BZ_OK){
sntLogErrorPrintf("bzip2 failed to initialize with error %ld.\n", err);
sntLogErrorPrintf("bzip2 failed to initialize with error %d.\n", err);
exit(EXIT_FAILURE);
}
err = BZ2_bzDecompressInit(bzip2uncom, 0, 0);
if(err < BZ_OK){
sntLogErrorPrintf("bzip2 failed to initialize with error %ld.\n", err);
sntLogErrorPrintf("bzip2 failed to initialize with error %d.\n", err);
exit(EXIT_FAILURE);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ SNTPool* sntPoolCreate(unsigned int num, unsigned int itemsize) {
}

int sntPoolLockMem(SNTPool* poolallocator){
return sntLockMemory(poolallocator->pool,
sntPoolNumNodes(poolallocator) * sntPoolItemSize(poolallocator));
size_t sizeInBytes = (size_t)sntPoolNumNodes(poolallocator) * (size_t)sntPoolItemSize(poolallocator);
return sntLockMemory(poolallocator->pool, sizeInBytes);
}

void* sntPoolObtain(SNTPool* allocator) {
Expand Down
9 changes: 5 additions & 4 deletions src/schd.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ void sntSchdGetAffinity(unsigned int* cpu, unsigned int* cores,
sntLogErrorPrintf("sched_setaffinity failed, %s.\n", strerror(errno));
}

for (j = 0; j < CPU_SETSIZE; ++j){
if (CPU_ISSET(j, &set)){
// Disabled intill needed.
// for (j = 0; j < CPU_SETSIZE; ++j){
// if (CPU_ISSET(j, &set)){

}
}
// }
// }

*cpu = 0;
*cores = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int sntLog2MutExlusive32(unsigned int a){
return (i + 1);
}

assert(0);
return 0;
}

int sntIsPower2(unsigned int n){
Expand Down

0 comments on commit 134751a

Please sign in to comment.