#91

Errors in GCC 15.2.0

OpenJamaika1opened 28d ago

Errors in GCC 15.2.0

kb_text_shape.h: In function 'void kbts__LoadParents(kbts_glyph*, kbts_glyph_parent*, long long unsigned int*, unsigned int*)':
kb_text_shape.h:21177:13: error: unused variable 'DecompositionSize' [-Werror=unused-variable]
21177 |     kbts_un DecompositionSize = kbts__GetDecompositionSize(Decomposition);
      |             ^~~~~~~~~~~~~~~~~
kb_text_shape.h: In function 'kbts_shape_config* kbts__PlaceShapeConfig(kbts_font*, kbts_script, kbts_language, float*, void*, long long unsigned int*, kbts_uid*)':
kb_text_shape.h:24460:41: warning: enumerated and non-enumerated type in conditional expression [-Wextra]
24460 |     Config.Shaper = FoundScriptIsIndic3 ? KBTS_SHAPER_USE : ScriptProperties->Shaper;
      |                     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kb_text_shape.h: In function 'float kbts_FontMetric(kbts_font*, unsigned int, float*)':
kb_text_shape.h:25356:21: error: unused variable 'Store_ItemVariationDataCount' [-Werror=unused-variable]
25356 |           kbts_u16 *Store_ItemVariationDataCount = kbts__item_variation_store_ItemVariationDataCount(Store);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kb_text_shape.h:25359:40: error: unused variable 'VariationRegionList' [-Werror=unused-variable]
25359 |           kbts__variation_region_list *VariationRegionList = KBTS__POINTER_OFFSET(kbts__variation_region_list, Store, kbts__ReadU32Unaligned(Store_VariationRegionListOffset));
      |                                        ^~~~~~~~~~~~~~~~~~~
kb_text_shape.h: In function 'kbts_font* kbts_ShapePushFont(kbts_shape_context*, kbts_font*)':
kb_text_shape.h:25519:14: error: unused variable 'Result' [-Werror=unused-variable]
25519 |   kbts_font *Result = kbts_ShapePushFont2(Context, Font, 0, 0, 0);
      |              ^~~~~~
kb_text_shape.h: In function 'kbts_load_font_error kbts_PlaceBlob(kbts_font*, kbts_load_font_state*, void*, void*)':
kb_text_shape.h:28454:17: error: unused variable 'HeaderSize' [-Werror=unused-variable]
28454 |         kbts_un HeaderSize = HeaderSizes[TableIdIndex];
      |                 ^~~~~~~~~~

Activity

1
JimmyLefevre10d ago

This is my first time seeing the enumerated-versus-non-enumerated warning. I added a cast on the enum, hopefully that should fix it?

The rest of the issues are also addressed in https://github.com/JimmyLefevre/kb/commit/7d811ad80215eef6363d60057b0ea140215278a1