*/}}
YimingWu 1 неделя назад
Родитель
Сommit
52eb0d8372
3 измененных файлов с 4 добавлено и 2 удалено
  1. 1 0
      CMakeLists.txt
  2. 1 1
      la_data.c
  3. 2 1
      resources/la_operators.c

+ 1 - 0
CMakeLists.txt

@@ -92,6 +92,7 @@ add_definitions(-Wno-incompatible-pointer-types)
 add_definitions(-Wno-int-conversion)
 add_definitions(-Wno-discarded-qualifiers)
 add_definitions(-Werror=implicit-function-declaration)
+add_definitions(-Werror=return-type)
 #add_definitions(-Wreturn-mismatch)
 add_definitions(-w)
 

+ 1 - 1
la_data.c

@@ -4815,7 +4815,7 @@ laDBProp* laFindStartingDBProp(laProp* p, void* Instance, laPropContainer* Insta
     }
     return 0;
 }
-void laRecordCustomDifferences(void* Data, laDiffCommandUndoF Undo, laDiffCommandRedoF Redo, laDiffCommandFreeF Free){ if(MAIN.ReadingUDF){ return 0; }
+void laRecordCustomDifferences(void* Data, laDiffCommandUndoF Undo, laDiffCommandRedoF Redo, laDiffCommandFreeF Free){ if(MAIN.ReadingUDF){ return; }
     laDiffCommandCustom* dcc=memAcquire(sizeof(laDiffCommandCustom));
     dcc->Data=Data; dcc->Undo=Undo; dcc->Redo=Redo; dcc->Free=Free;
     lstAppendItem(&MAIN.HeadDifference->CustomCommands,dcc);

+ 2 - 1
resources/la_operators.c

@@ -2700,7 +2700,8 @@ static int la_InitProofLUT(void** lut, cmsHPROFILE cmyk_profile, cmsHPROFILE rgb
     cmsDoTransform(htransform,data,table,LA_LUT_PIXCOUNT);
 }
 int laLoadProofingICC(char* path){
-    cmsHPROFILE cmyk = cmsOpenProfileFromFile(path,"r"); if(!cmyk) return 0;
+    FILE* file=fopen(path,"r"); if(!file) return 0;
+    cmsHPROFILE cmyk = cmsOpenProfileFromStream(file,"r"); if(!cmyk) return 0;
     cmsHPROFILE srgb = cmsCreate_sRGBProfile();
     cmsHPROFILE clay = la_CreateProfileClay();
     cmsHPROFILE d65p3 = la_CreateProfileD65P3();