最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c - Android Clang - How to initialize a char * table of Utf8-chars of various byte-length? - Stack Overflow

programmeradmin2浏览0评论

It works, MS VS C compilers do not warn for this, but Android Studio Clang does.

  • How to suppress the Android Clang warning?
  • Or make it better coding?

Warning: initializing 'UCHAR *' (aka 'unsigned char *') with an expression of type 'char[2]' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign] { "la", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}, // Arabic, Latin, Cyrillic, and Greek Arabic numerals

const UCHAR* NumeralsLocale[MAX_NUMERICAL_LOCALES][MAX_NUMERICAL_COLUMNS] =
{
    // Symbol   Used with scripts   Numerals
    { "la", "0",    "1",    "2",    "3",    "4",    "5",    "6",    "7",    "8",    "9"},           //  Arabic, Latin, Cyrillic, and Greek  Arabic numerals
    { "ar", "٠",    "١",    "٢",    "٣",    "٤",    "٥",    "٦",    "٧",    "٨",    "٩" },          //  Arabic  Eastern Arabic numerals
    { "fa", "۰",    "۱",    "۲",    "۳",    "۴",    "۵",    "۶",    "۷",    "۸",    "۹" },          //  Persian / Dari / Pashto
    { "ps", "۰",    "۱",    "۲",    "۳",    "۴",    "۵",    "۶",    "۷",    "۸",    "۹" },          //  Pashto (afgan)
    { "ur", "۰",    "۱",    "۲",    "۳",    "۴",    "۵",    "۶",    "۷",    "۸",    "۹" },          //  Urdu / Shahmukhi
    { "hi", "०",        "१",        "२",        "३",        "४",    "५",    "६",    "७",    "८",        "९" },          //  Hindi Devanagari    Devanagari numerals
    { "ne", "०",        "१",        "२",        "३",        "४",    "५",    "६",    "७",    "८",        "९" },          //  Nepali Devanagari   Devanagari numerals
    { "mr", "०",        "१",        "२",        "३",        "४",    "५",    "६",    "७",    "८",        "९" },          //  Marathi Devanagari  Devanagari numerals
    { "ta", "௦",        "௧",    "௨",    "௩",    "௪",    "௫",    "௬",    "௭",    "௮",    "௯" },          //  Tamil   Tamil numerals
    { "bn", "০",    "১",        "২",    "৩",    "৪",    "৫",    "৬",    "৭",    "৮",    "৯" },          //  Eastern Nagari  Bengali numerals
    { "pa", "੦",    "੧",    "੨",    "੩",    "੪",    "੫",    "੬",    "੭",    "੮",    "੯" },          //  Gurmukhi    Gurmukhi numerals
    { "gu", "૦",        "૧",        "૨",        "૩",    "૪",    "૫",    "૬",        "૭",    "૮",        "૯" },          //  Gujarati    Gujarati numerals
    { "sd", "
发布评论

评论列表(0)

  1. 暂无评论