[v2 PATCH] dwrite: use correct integral types.

Nikolay Sivov nsivov at codeweavers.com
Tue Feb 1 01:39:38 CST 2022


From: Eric Pouech <eric.pouech at gmail.com>

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/dwrite/font.c     | 2 +-
 dlls/dwrite/main.c     | 3 ++-
 dlls/dwrite/opentype.c | 5 +++--
 dlls/dwrite/shape.c    | 4 ++--
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index cbc0434b72d..4b32bf1e0de 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -5084,7 +5084,7 @@ HRESULT get_eudc_fontcollection(IDWriteFactory7 *factory, IDWriteFontCollection3
     struct dwrite_fontcollection *collection;
     WCHAR eudckeypathW[16];
     HKEY eudckey;
-    DWORD index;
+    UINT32 index;
     BOOL exists;
     LONG retval;
     HRESULT hr;
diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c
index ab53d5cb80d..26415201d91 100644
--- a/dlls/dwrite/main.c
+++ b/dlls/dwrite/main.c
@@ -1515,8 +1515,9 @@ static HRESULT WINAPI dwritefactory3_CreateFontFaceReference(IDWriteFactory7 *if
 
 static HRESULT create_system_path_list(WCHAR ***ret, unsigned int *ret_count)
 {
-    unsigned int index = 0, value_size, name_count, max_name_count, type, data_size;
+    unsigned int index = 0, value_size, max_name_count;
     WCHAR **paths = NULL, *name, *value = NULL;
+    DWORD name_count, type, data_size;
     size_t capacity = 0, count = 0;
     HKEY hkey;
     LONG r;
diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c
index 452b00240b8..5bac32f9ee7 100644
--- a/dlls/dwrite/opentype.c
+++ b/dlls/dwrite/opentype.c
@@ -4607,8 +4607,8 @@ static void opentype_layout_collect_lookups(struct scriptshaping_context *contex
     next_bit = global_bit_shift + 1;
     for (i = 0; i < features->count; ++i)
     {
-        unsigned int bits_needed;
         BOOL found = FALSE;
+        DWORD bits_needed;
 
         feature = &features->features[i];
 
@@ -5077,7 +5077,8 @@ static BOOL opentype_layout_apply_gsub_alt_substitution(struct scriptshaping_con
     if (format == 1)
     {
         const struct ot_gsub_altsubst_format1 *format1 = table_read_ensure(table, subtable_offset, sizeof(*format1));
-        unsigned int shift, alt_index;
+        DWORD shift;
+        unsigned int alt_index;
         UINT16 set_offset;
 
         coverage = table_read_be_word(table, subtable_offset + FIELD_OFFSET(struct ot_gsub_altsubst_format1, coverage));
diff --git a/dlls/dwrite/shape.c b/dlls/dwrite/shape.c
index 177ad1d06fe..bf80d686052 100644
--- a/dlls/dwrite/shape.c
+++ b/dlls/dwrite/shape.c
@@ -67,10 +67,10 @@ void release_scriptshaping_cache(struct scriptshaping_cache *cache)
     free(cache);
 }
 
-static unsigned int shape_select_script(const struct scriptshaping_cache *cache, DWORD kind, const DWORD *scripts,
+static unsigned int shape_select_script(const struct scriptshaping_cache *cache, DWORD kind, const unsigned int *scripts,
         unsigned int *script_index)
 {
-    static const DWORD fallback_scripts[] =
+    static const unsigned int fallback_scripts[] =
     {
         DWRITE_MAKE_OPENTYPE_TAG('D','F','L','T'),
         DWRITE_MAKE_OPENTYPE_TAG('d','f','l','t'),
-- 
2.34.1




More information about the wine-devel mailing list