]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/tools/toolutil/toolutil.cpp
ICU-66108.tar.gz
[apple/icu.git] / icuSources / tools / toolutil / toolutil.cpp
index 2d6585a88b8e45636ae86c3c53baa7c6eb35c46e..a035f2326a69a17b94eb08a7dd7395000ca02799 100644 (file)
@@ -1,3 +1,5 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 *******************************************************************************
 *
@@ -6,7 +8,7 @@
 *
 *******************************************************************************
 *   file name:  toolutil.c
-*   encoding:   US-ASCII
+*   encoding:   UTF-8
 *   tab size:   8 (not used)
 *   indentation:4
 *
@@ -141,7 +143,7 @@ findDirname(const char *path, char *buffer, int32_t bufLen, UErrorCode* status)
     resultLen = 0;
   } else {
     resultPtr = path;
-    resultLen = basename - path;
+    resultLen = static_cast<int32_t>(basename - path);
     if(resultLen<1) {
       resultLen = 1; /* '/' or '/a' -> '/' */
     }
@@ -241,7 +243,7 @@ struct UToolMemory {
     char name[64];
     int32_t capacity, maxCapacity, size, idx;
     void *array;
-    UAlignedMemory staticArray[1];
+    alignas(max_align_t) char staticArray[1];
 };
 
 U_CAPI UToolMemory * U_EXPORT2