When using `./configure CFLAGS="-Wall -O2 -g"` we get an "unused-function"
warning at compile time. This was raised by @strk in #130. This commit fixes
the issue.
When compressing a patch from GHT to LAZPERF the pc_patch_compress function
currently returns the uncompressed patch.
This commit fixes the bug in pc_patch_compress and adds unit tests for
pc_patch_compress.
* PC_Sort and PC_IsSorted
* fixing -Wdeclaration-after-statement warnings
* using sort_r for a portable definition of qsort_r/qsort_s
* uncompression fallback for lazperf/is_sorted
* NEWS updated, sort_r github reference and README added
* Remove unused function in pc_patch_ght.c
* Remove unused vars in pc_patch_lazperf.c
* Remove unused vars in cu_pc_patch_ght.c
* Remove unused vars in cu_pc_point.c
* Remove unused vars in cu_pc_bytes.c
* Introduce LAZPERF_CPPFLAGS
Without this the las.hpp header file is not found when lazperf was
installed in a non-system place.
* Use GHT_CPPFLAGS
Without this the ght.h header file is not found when libght was installed in
a non-system place.
* Use tabs in Makefiles
In CUnit 2.1-2 and before the CU_SuiteInfo structure looks like this:
typedef struct CU_SuiteInfo {
const char *pName;
CU_InitializeFunc pInitFunc;
CU_CleanupFunc pCleanupFunc;
CU_TestInfo *pTests;
} CU_SuiteInfo;
In CUnit 2.1-3 it looks like this:
typedef struct CU_SuiteInfo {
const char *pName;
CU_InitializeFunc pInitFunc;
CU_CleanupFunc pCleanupFunc;
CU_SetUpFunc pSetUpFunc;
CU_TearDownFunc pTearDownFunc;
CU_TestInfo *pTests;
} CU_SuiteInfo;
This commit changes the test code so it works with both CUnit 2.1-2 and CUnit
2.1-3.
The function was written by Remi-C and slightly modified by me
to avoid the check for NULL and be const-correct.
Also I've added a unit test for the new library function.