Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-07-29 06:48:09 +0300
committerCampbell Barton <campbell@blender.org>2022-07-29 06:48:09 +0300
commit4815772fdaf2a9c4980c0d76aff78faebdbda17a (patch)
treec7d9c53b55b5e534978477c3b2d43e54bb08326d
parente9bd6abde37c276f1b8a9a22f5312d794b0f159b (diff)
Cleanup: quiet warnings in recent BLF and rna_ui changes
-rw-r--r--source/blender/blenfont/intern/blf_font.c16
-rw-r--r--source/blender/blenfont/intern/blf_internal.h4
-rw-r--r--source/blender/makesrna/intern/rna_ui.c2
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index fed01d90314..eb974f33994 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -1375,10 +1375,10 @@ static const eFaceDetails static_face_details[] = {
};
/* Create a new font from filename OR from passed memory pointer. */
-FontBLF *blf_font_new_ex(const char *name,
- const char *filepath,
- const unsigned char *mem,
- int mem_size)
+static FontBLF *blf_font_new_ex(const char *name,
+ const char *filepath,
+ const unsigned char *mem,
+ const size_t mem_size)
{
FontBLF *font = (FontBLF *)MEM_callocN(sizeof(FontBLF), "blf_font_new");
@@ -1393,7 +1393,7 @@ FontBLF *blf_font_new_ex(const char *name,
/* If we have static details about this font we don't need to load the Face. */
const eFaceDetails *static_details = NULL;
char filename[256];
- for (int i = 0; i < ARRAY_SIZE(static_face_details); i++) {
+ for (int i = 0; i < (int)ARRAY_SIZE(static_face_details); i++) {
BLI_split_file_part(font->filepath, filename, sizeof(filename));
if (STREQ(static_face_details[i].name, filename)) {
static_details = &static_face_details[i];
@@ -1426,18 +1426,18 @@ FontBLF *blf_font_new(const char *name, const char *filename)
return blf_font_new_ex(name, filename, NULL, 0);
}
-FontBLF *blf_font_new_from_mem(const char *name, const unsigned char *mem, int mem_size)
+FontBLF *blf_font_new_from_mem(const char *name, const unsigned char *mem, const size_t mem_size)
{
return blf_font_new_ex(name, NULL, mem, mem_size);
}
-void blf_font_attach_from_mem(FontBLF *font, const unsigned char *mem, int mem_size)
+void blf_font_attach_from_mem(FontBLF *font, const unsigned char *mem, const size_t mem_size)
{
FT_Open_Args open;
open.flags = FT_OPEN_MEMORY;
open.memory_base = (const FT_Byte *)mem;
- open.memory_size = mem_size;
+ open.memory_size = (FT_Long)mem_size;
FT_Attach_Stream(font->face, &open);
}
diff --git a/source/blender/blenfont/intern/blf_internal.h b/source/blender/blenfont/intern/blf_internal.h
index 4a194825cf7..6207edb0107 100644
--- a/source/blender/blenfont/intern/blf_internal.h
+++ b/source/blender/blenfont/intern/blf_internal.h
@@ -45,8 +45,8 @@ void blf_draw_buffer__start(struct FontBLF *font);
void blf_draw_buffer__end(void);
struct FontBLF *blf_font_new(const char *name, const char *filepath);
-struct FontBLF *blf_font_new_from_mem(const char *name, const unsigned char *mem, int mem_size);
-void blf_font_attach_from_mem(struct FontBLF *font, const unsigned char *mem, int mem_size);
+struct FontBLF *blf_font_new_from_mem(const char *name, const unsigned char *mem, size_t mem_size);
+void blf_font_attach_from_mem(struct FontBLF *font, const unsigned char *mem, size_t mem_size);
/**
* Change font's output size. Returns true if successful in changing the size.
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index d3d827de3e5..adb959944b5 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -527,7 +527,7 @@ static void uilist_draw_filter(uiList *ui_list, const bContext *C, uiLayout *lay
}
static void uilist_filter_items(uiList *ui_list,
- bContext *C,
+ const bContext *C,
PointerRNA *dataptr,
const char *propname)
{