Skip to content

Commit

Permalink
Minor cosmetic fixes
Browse files Browse the repository at this point in the history
- Left typos
- meson build by #292
- Fix valgrind warning on writing uninitialized memory
  • Loading branch information
mm2 committed Jan 7, 2022
1 parent a98c03c commit dc04b14
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
7 changes: 3 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
project('Little-CMS', 'c',
version: '2.12',
version: '2.13',
meson_version: '>=0.48.0',
)

library_version = '2.0.12'
library_version = '2.0.13'

cc = meson.get_compiler('c')

Expand Down Expand Up @@ -59,13 +59,12 @@ endif

if cc.has_function_attribute('visibility:hidden')
cargs +='-DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1'
elif cc.get_id() == 'msvc'
cargs += '-DCMS_DLL_BUILD=1'
endif

if host_machine.system() == 'windows'
win = import('windows')
lcms2_srcs += win.compile_resources('Projects/VC2019/lcms2.rc')
cargs += '-DCMS_DLL_BUILD=1'
endif

liblcms2_lib = library('lcms2', lcms2_srcs,
Expand Down
4 changes: 4 additions & 0 deletions src/cmstypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -3227,6 +3227,10 @@ cmsBool Type_NamedColor_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER
cmsUInt16Number Colorant[cmsMAXCHANNELS];
char Root[cmsMAX_PATH];

memset(Root, 0, sizeof(Root));
memset(PCS, 0, sizeof(PCS));
memset(Colorant, 0, sizeof(Colorant));

if (!cmsNamedColorInfo(NamedColorList, i, Root, NULL, NULL, PCS, Colorant)) return 0;
Root[32] = 0;
if (!io ->Write(io, 32 , Root)) return FALSE;
Expand Down
2 changes: 1 addition & 1 deletion src/cmswtpnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ cmsBool _cmsAdaptMatrixToD50(cmsMAT3* r, const cmsCIExyY* SourceWhitePt)
// aspects of the RGB to XYZ process, and assuming that the gamma correction
// has transitive property in the transformation chain.
//
// the algoritm:
// the algorithm:
//
// - First I build the absolute conversion matrix using
// primaries in XYZ. This matrix is next inverted
Expand Down
2 changes: 1 addition & 1 deletion testbed/testcms2.c
Original file line number Diff line number Diff line change
Expand Up @@ -8279,7 +8279,7 @@ double distance(const cmsUInt16Number* a, const cmsUInt16Number* b)

/**
* In 2.12, a report suggest that the built-in sRGB has roundtrip errors that makes color to move
* when roundripping again and again
* when roundtripping again and again
*/
static
int Check_sRGB_Rountrips(void)
Expand Down

0 comments on commit dc04b14

Please sign in to comment.